ppp_deflate.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * ppp_deflate.c - interface the zlib procedures for Deflate compression
  4. * and decompression (as used by gzip) to the PPP code.
  5. *
  6. * Copyright 1994-1998 Paul Mackerras.
  7. */
  8. #include <linux/module.h>
  9. #include <linux/slab.h>
  10. #include <linux/vmalloc.h>
  11. #include <linux/init.h>
  12. #include <linux/string.h>
  13. #include <linux/ppp_defs.h>
  14. #include <linux/ppp-comp.h>
  15. #include <linux/zlib.h>
  16. #include <asm/unaligned.h>
  17. /*
  18. * State for a Deflate (de)compressor.
  19. */
  20. struct ppp_deflate_state {
  21. int seqno;
  22. int w_size;
  23. int unit;
  24. int mru;
  25. int debug;
  26. z_stream strm;
  27. struct compstat stats;
  28. };
  29. #define DEFLATE_OVHD 2 /* Deflate overhead/packet */
  30. static void *z_comp_alloc(unsigned char *options, int opt_len);
  31. static void *z_decomp_alloc(unsigned char *options, int opt_len);
  32. static void z_comp_free(void *state);
  33. static void z_decomp_free(void *state);
  34. static int z_comp_init(void *state, unsigned char *options,
  35. int opt_len,
  36. int unit, int hdrlen, int debug);
  37. static int z_decomp_init(void *state, unsigned char *options,
  38. int opt_len,
  39. int unit, int hdrlen, int mru, int debug);
  40. static int z_compress(void *state, unsigned char *rptr,
  41. unsigned char *obuf,
  42. int isize, int osize);
  43. static void z_incomp(void *state, unsigned char *ibuf, int icnt);
  44. static int z_decompress(void *state, unsigned char *ibuf,
  45. int isize, unsigned char *obuf, int osize);
  46. static void z_comp_reset(void *state);
  47. static void z_decomp_reset(void *state);
  48. static void z_comp_stats(void *state, struct compstat *stats);
  49. /**
  50. * z_comp_free - free the memory used by a compressor
  51. * @arg: pointer to the private state for the compressor.
  52. */
  53. static void z_comp_free(void *arg)
  54. {
  55. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  56. if (state) {
  57. zlib_deflateEnd(&state->strm);
  58. vfree(state->strm.workspace);
  59. kfree(state);
  60. }
  61. }
  62. /**
  63. * z_comp_alloc - allocate space for a compressor.
  64. * @options: pointer to CCP option data
  65. * @opt_len: length of the CCP option at @options.
  66. *
  67. * The @options pointer points to the a buffer containing the
  68. * CCP option data for the compression being negotiated. It is
  69. * formatted according to RFC1979, and describes the window
  70. * size that the peer is requesting that we use in compressing
  71. * data to be sent to it.
  72. *
  73. * Returns the pointer to the private state for the compressor,
  74. * or NULL if we could not allocate enough memory.
  75. */
  76. static void *z_comp_alloc(unsigned char *options, int opt_len)
  77. {
  78. struct ppp_deflate_state *state;
  79. int w_size;
  80. if (opt_len != CILEN_DEFLATE ||
  81. (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT) ||
  82. options[1] != CILEN_DEFLATE ||
  83. DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL ||
  84. options[3] != DEFLATE_CHK_SEQUENCE)
  85. return NULL;
  86. w_size = DEFLATE_SIZE(options[2]);
  87. if (w_size < DEFLATE_MIN_SIZE || w_size > DEFLATE_MAX_SIZE)
  88. return NULL;
  89. state = kzalloc(sizeof(*state),
  90. GFP_KERNEL);
  91. if (state == NULL)
  92. return NULL;
  93. state->strm.next_in = NULL;
  94. state->w_size = w_size;
  95. state->strm.workspace = vmalloc(zlib_deflate_workspacesize(-w_size, 8));
  96. if (state->strm.workspace == NULL)
  97. goto out_free;
  98. if (zlib_deflateInit2(&state->strm, Z_DEFAULT_COMPRESSION,
  99. DEFLATE_METHOD_VAL, -w_size, 8, Z_DEFAULT_STRATEGY)
  100. != Z_OK)
  101. goto out_free;
  102. return (void *) state;
  103. out_free:
  104. z_comp_free(state);
  105. return NULL;
  106. }
  107. /**
  108. * z_comp_init - initialize a previously-allocated compressor.
  109. * @arg: pointer to the private state for the compressor
  110. * @options: pointer to the CCP option data describing the
  111. * compression that was negotiated with the peer
  112. * @opt_len: length of the CCP option data at @options
  113. * @unit: PPP unit number for diagnostic messages
  114. * @hdrlen: ignored (present for backwards compatibility)
  115. * @debug: debug flag; if non-zero, debug messages are printed.
  116. *
  117. * The CCP options described by @options must match the options
  118. * specified when the compressor was allocated. The compressor
  119. * history is reset. Returns 0 for failure (CCP options don't
  120. * match) or 1 for success.
  121. */
  122. static int z_comp_init(void *arg, unsigned char *options, int opt_len,
  123. int unit, int hdrlen, int debug)
  124. {
  125. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  126. if (opt_len < CILEN_DEFLATE ||
  127. (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT) ||
  128. options[1] != CILEN_DEFLATE ||
  129. DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL ||
  130. DEFLATE_SIZE(options[2]) != state->w_size ||
  131. options[3] != DEFLATE_CHK_SEQUENCE)
  132. return 0;
  133. state->seqno = 0;
  134. state->unit = unit;
  135. state->debug = debug;
  136. zlib_deflateReset(&state->strm);
  137. return 1;
  138. }
  139. /**
  140. * z_comp_reset - reset a previously-allocated compressor.
  141. * @arg: pointer to private state for the compressor.
  142. *
  143. * This clears the history for the compressor and makes it
  144. * ready to start emitting a new compressed stream.
  145. */
  146. static void z_comp_reset(void *arg)
  147. {
  148. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  149. state->seqno = 0;
  150. zlib_deflateReset(&state->strm);
  151. }
  152. /**
  153. * z_compress - compress a PPP packet with Deflate compression.
  154. * @arg: pointer to private state for the compressor
  155. * @rptr: uncompressed packet (input)
  156. * @obuf: compressed packet (output)
  157. * @isize: size of uncompressed packet
  158. * @osize: space available at @obuf
  159. *
  160. * Returns the length of the compressed packet, or 0 if the
  161. * packet is incompressible.
  162. */
  163. static int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf,
  164. int isize, int osize)
  165. {
  166. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  167. int r, proto, off, olen, oavail;
  168. unsigned char *wptr;
  169. /*
  170. * Check that the protocol is in the range we handle.
  171. */
  172. proto = PPP_PROTOCOL(rptr);
  173. if (proto > 0x3fff || proto == 0xfd || proto == 0xfb)
  174. return 0;
  175. /* Don't generate compressed packets which are larger than
  176. the uncompressed packet. */
  177. if (osize > isize)
  178. osize = isize;
  179. wptr = obuf;
  180. /*
  181. * Copy over the PPP header and store the 2-byte sequence number.
  182. */
  183. wptr[0] = PPP_ADDRESS(rptr);
  184. wptr[1] = PPP_CONTROL(rptr);
  185. put_unaligned_be16(PPP_COMP, wptr + 2);
  186. wptr += PPP_HDRLEN;
  187. put_unaligned_be16(state->seqno, wptr);
  188. wptr += DEFLATE_OVHD;
  189. olen = PPP_HDRLEN + DEFLATE_OVHD;
  190. state->strm.next_out = wptr;
  191. state->strm.avail_out = oavail = osize - olen;
  192. ++state->seqno;
  193. off = (proto > 0xff) ? 2 : 3; /* skip 1st proto byte if 0 */
  194. rptr += off;
  195. state->strm.next_in = rptr;
  196. state->strm.avail_in = (isize - off);
  197. for (;;) {
  198. r = zlib_deflate(&state->strm, Z_PACKET_FLUSH);
  199. if (r != Z_OK) {
  200. if (state->debug)
  201. printk(KERN_ERR
  202. "z_compress: deflate returned %d\n", r);
  203. break;
  204. }
  205. if (state->strm.avail_out == 0) {
  206. olen += oavail;
  207. state->strm.next_out = NULL;
  208. state->strm.avail_out = oavail = 1000000;
  209. } else {
  210. break; /* all done */
  211. }
  212. }
  213. olen += oavail - state->strm.avail_out;
  214. /*
  215. * See if we managed to reduce the size of the packet.
  216. */
  217. if (olen < isize && olen <= osize) {
  218. state->stats.comp_bytes += olen;
  219. state->stats.comp_packets++;
  220. } else {
  221. state->stats.inc_bytes += isize;
  222. state->stats.inc_packets++;
  223. olen = 0;
  224. }
  225. state->stats.unc_bytes += isize;
  226. state->stats.unc_packets++;
  227. return olen;
  228. }
  229. /**
  230. * z_comp_stats - return compression statistics for a compressor
  231. * or decompressor.
  232. * @arg: pointer to private space for the (de)compressor
  233. * @stats: pointer to a struct compstat to receive the result.
  234. */
  235. static void z_comp_stats(void *arg, struct compstat *stats)
  236. {
  237. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  238. *stats = state->stats;
  239. }
  240. /**
  241. * z_decomp_free - Free the memory used by a decompressor.
  242. * @arg: pointer to private space for the decompressor.
  243. */
  244. static void z_decomp_free(void *arg)
  245. {
  246. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  247. if (state) {
  248. zlib_inflateEnd(&state->strm);
  249. vfree(state->strm.workspace);
  250. kfree(state);
  251. }
  252. }
  253. /**
  254. * z_decomp_alloc - allocate space for a decompressor.
  255. * @options: pointer to CCP option data
  256. * @opt_len: length of the CCP option at @options.
  257. *
  258. * The @options pointer points to the a buffer containing the
  259. * CCP option data for the compression being negotiated. It is
  260. * formatted according to RFC1979, and describes the window
  261. * size that we are requesting the peer to use in compressing
  262. * data to be sent to us.
  263. *
  264. * Returns the pointer to the private state for the decompressor,
  265. * or NULL if we could not allocate enough memory.
  266. */
  267. static void *z_decomp_alloc(unsigned char *options, int opt_len)
  268. {
  269. struct ppp_deflate_state *state;
  270. int w_size;
  271. if (opt_len != CILEN_DEFLATE ||
  272. (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT) ||
  273. options[1] != CILEN_DEFLATE ||
  274. DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL ||
  275. options[3] != DEFLATE_CHK_SEQUENCE)
  276. return NULL;
  277. w_size = DEFLATE_SIZE(options[2]);
  278. if (w_size < DEFLATE_MIN_SIZE || w_size > DEFLATE_MAX_SIZE)
  279. return NULL;
  280. state = kzalloc(sizeof(*state), GFP_KERNEL);
  281. if (state == NULL)
  282. return NULL;
  283. state->w_size = w_size;
  284. state->strm.next_out = NULL;
  285. state->strm.workspace = vmalloc(zlib_inflate_workspacesize());
  286. if (state->strm.workspace == NULL)
  287. goto out_free;
  288. if (zlib_inflateInit2(&state->strm, -w_size) != Z_OK)
  289. goto out_free;
  290. return (void *) state;
  291. out_free:
  292. z_decomp_free(state);
  293. return NULL;
  294. }
  295. /**
  296. * z_decomp_init - initialize a previously-allocated decompressor.
  297. * @arg: pointer to the private state for the decompressor
  298. * @options: pointer to the CCP option data describing the
  299. * compression that was negotiated with the peer
  300. * @opt_len: length of the CCP option data at @options
  301. * @unit: PPP unit number for diagnostic messages
  302. * @hdrlen: ignored (present for backwards compatibility)
  303. * @mru: maximum length of decompressed packets
  304. * @debug: debug flag; if non-zero, debug messages are printed.
  305. *
  306. * The CCP options described by @options must match the options
  307. * specified when the decompressor was allocated. The decompressor
  308. * history is reset. Returns 0 for failure (CCP options don't
  309. * match) or 1 for success.
  310. */
  311. static int z_decomp_init(void *arg, unsigned char *options, int opt_len,
  312. int unit, int hdrlen, int mru, int debug)
  313. {
  314. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  315. if (opt_len < CILEN_DEFLATE ||
  316. (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT) ||
  317. options[1] != CILEN_DEFLATE ||
  318. DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL ||
  319. DEFLATE_SIZE(options[2]) != state->w_size ||
  320. options[3] != DEFLATE_CHK_SEQUENCE)
  321. return 0;
  322. state->seqno = 0;
  323. state->unit = unit;
  324. state->debug = debug;
  325. state->mru = mru;
  326. zlib_inflateReset(&state->strm);
  327. return 1;
  328. }
  329. /**
  330. * z_decomp_reset - reset a previously-allocated decompressor.
  331. * @arg: pointer to private state for the decompressor.
  332. *
  333. * This clears the history for the decompressor and makes it
  334. * ready to receive a new compressed stream.
  335. */
  336. static void z_decomp_reset(void *arg)
  337. {
  338. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  339. state->seqno = 0;
  340. zlib_inflateReset(&state->strm);
  341. }
  342. /**
  343. * z_decompress - decompress a Deflate-compressed packet.
  344. * @arg: pointer to private state for the decompressor
  345. * @ibuf: pointer to input (compressed) packet data
  346. * @isize: length of input packet
  347. * @obuf: pointer to space for output (decompressed) packet
  348. * @osize: amount of space available at @obuf
  349. *
  350. * Because of patent problems, we return DECOMP_ERROR for errors
  351. * found by inspecting the input data and for system problems, but
  352. * DECOMP_FATALERROR for any errors which could possibly be said to
  353. * be being detected "after" decompression. For DECOMP_ERROR,
  354. * we can issue a CCP reset-request; for DECOMP_FATALERROR, we may be
  355. * infringing a patent of Motorola's if we do, so we take CCP down
  356. * instead.
  357. *
  358. * Given that the frame has the correct sequence number and a good FCS,
  359. * errors such as invalid codes in the input most likely indicate a
  360. * bug, so we return DECOMP_FATALERROR for them in order to turn off
  361. * compression, even though they are detected by inspecting the input.
  362. */
  363. static int z_decompress(void *arg, unsigned char *ibuf, int isize,
  364. unsigned char *obuf, int osize)
  365. {
  366. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  367. int olen, seq, r;
  368. int decode_proto, overflow;
  369. unsigned char overflow_buf[1];
  370. if (isize <= PPP_HDRLEN + DEFLATE_OVHD) {
  371. if (state->debug)
  372. printk(KERN_DEBUG "z_decompress%d: short pkt (%d)\n",
  373. state->unit, isize);
  374. return DECOMP_ERROR;
  375. }
  376. /* Check the sequence number. */
  377. seq = get_unaligned_be16(ibuf + PPP_HDRLEN);
  378. if (seq != (state->seqno & 0xffff)) {
  379. if (state->debug)
  380. printk(KERN_DEBUG "z_decompress%d: bad seq # %d, expected %d\n",
  381. state->unit, seq, state->seqno & 0xffff);
  382. return DECOMP_ERROR;
  383. }
  384. ++state->seqno;
  385. /*
  386. * Fill in the first part of the PPP header. The protocol field
  387. * comes from the decompressed data.
  388. */
  389. obuf[0] = PPP_ADDRESS(ibuf);
  390. obuf[1] = PPP_CONTROL(ibuf);
  391. obuf[2] = 0;
  392. /*
  393. * Set up to call inflate. We set avail_out to 1 initially so we can
  394. * look at the first byte of the output and decide whether we have
  395. * a 1-byte or 2-byte protocol field.
  396. */
  397. state->strm.next_in = ibuf + PPP_HDRLEN + DEFLATE_OVHD;
  398. state->strm.avail_in = isize - (PPP_HDRLEN + DEFLATE_OVHD);
  399. state->strm.next_out = obuf + 3;
  400. state->strm.avail_out = 1;
  401. decode_proto = 1;
  402. overflow = 0;
  403. /*
  404. * Call inflate, supplying more input or output as needed.
  405. */
  406. for (;;) {
  407. r = zlib_inflate(&state->strm, Z_PACKET_FLUSH);
  408. if (r != Z_OK) {
  409. if (state->debug)
  410. printk(KERN_DEBUG "z_decompress%d: inflate returned %d (%s)\n",
  411. state->unit, r, (state->strm.msg? state->strm.msg: ""));
  412. return DECOMP_FATALERROR;
  413. }
  414. if (state->strm.avail_out != 0)
  415. break; /* all done */
  416. if (decode_proto) {
  417. state->strm.avail_out = osize - PPP_HDRLEN;
  418. if ((obuf[3] & 1) == 0) {
  419. /* 2-byte protocol field */
  420. obuf[2] = obuf[3];
  421. --state->strm.next_out;
  422. ++state->strm.avail_out;
  423. }
  424. decode_proto = 0;
  425. } else if (!overflow) {
  426. /*
  427. * We've filled up the output buffer; the only way to
  428. * find out whether inflate has any more characters
  429. * left is to give it another byte of output space.
  430. */
  431. state->strm.next_out = overflow_buf;
  432. state->strm.avail_out = 1;
  433. overflow = 1;
  434. } else {
  435. if (state->debug)
  436. printk(KERN_DEBUG "z_decompress%d: ran out of mru\n",
  437. state->unit);
  438. return DECOMP_FATALERROR;
  439. }
  440. }
  441. if (decode_proto) {
  442. if (state->debug)
  443. printk(KERN_DEBUG "z_decompress%d: didn't get proto\n",
  444. state->unit);
  445. return DECOMP_ERROR;
  446. }
  447. olen = osize + overflow - state->strm.avail_out;
  448. state->stats.unc_bytes += olen;
  449. state->stats.unc_packets++;
  450. state->stats.comp_bytes += isize;
  451. state->stats.comp_packets++;
  452. return olen;
  453. }
  454. /**
  455. * z_incomp - add incompressible input data to the history.
  456. * @arg: pointer to private state for the decompressor
  457. * @ibuf: pointer to input packet data
  458. * @icnt: length of input data.
  459. */
  460. static void z_incomp(void *arg, unsigned char *ibuf, int icnt)
  461. {
  462. struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
  463. int proto, r;
  464. /*
  465. * Check that the protocol is one we handle.
  466. */
  467. proto = PPP_PROTOCOL(ibuf);
  468. if (proto > 0x3fff || proto == 0xfd || proto == 0xfb)
  469. return;
  470. ++state->seqno;
  471. /*
  472. * We start at the either the 1st or 2nd byte of the protocol field,
  473. * depending on whether the protocol value is compressible.
  474. */
  475. state->strm.next_in = ibuf + 3;
  476. state->strm.avail_in = icnt - 3;
  477. if (proto > 0xff) {
  478. --state->strm.next_in;
  479. ++state->strm.avail_in;
  480. }
  481. r = zlib_inflateIncomp(&state->strm);
  482. if (r != Z_OK) {
  483. /* gak! */
  484. if (state->debug) {
  485. printk(KERN_DEBUG "z_incomp%d: inflateIncomp returned %d (%s)\n",
  486. state->unit, r, (state->strm.msg? state->strm.msg: ""));
  487. }
  488. return;
  489. }
  490. /*
  491. * Update stats.
  492. */
  493. state->stats.inc_bytes += icnt;
  494. state->stats.inc_packets++;
  495. state->stats.unc_bytes += icnt;
  496. state->stats.unc_packets++;
  497. }
  498. /*************************************************************
  499. * Module interface table
  500. *************************************************************/
  501. /* These are in ppp_generic.c */
  502. extern int ppp_register_compressor (struct compressor *cp);
  503. extern void ppp_unregister_compressor (struct compressor *cp);
  504. /*
  505. * Procedures exported to if_ppp.c.
  506. */
  507. static struct compressor ppp_deflate = {
  508. .compress_proto = CI_DEFLATE,
  509. .comp_alloc = z_comp_alloc,
  510. .comp_free = z_comp_free,
  511. .comp_init = z_comp_init,
  512. .comp_reset = z_comp_reset,
  513. .compress = z_compress,
  514. .comp_stat = z_comp_stats,
  515. .decomp_alloc = z_decomp_alloc,
  516. .decomp_free = z_decomp_free,
  517. .decomp_init = z_decomp_init,
  518. .decomp_reset = z_decomp_reset,
  519. .decompress = z_decompress,
  520. .incomp = z_incomp,
  521. .decomp_stat = z_comp_stats,
  522. .owner = THIS_MODULE
  523. };
  524. static struct compressor ppp_deflate_draft = {
  525. .compress_proto = CI_DEFLATE_DRAFT,
  526. .comp_alloc = z_comp_alloc,
  527. .comp_free = z_comp_free,
  528. .comp_init = z_comp_init,
  529. .comp_reset = z_comp_reset,
  530. .compress = z_compress,
  531. .comp_stat = z_comp_stats,
  532. .decomp_alloc = z_decomp_alloc,
  533. .decomp_free = z_decomp_free,
  534. .decomp_init = z_decomp_init,
  535. .decomp_reset = z_decomp_reset,
  536. .decompress = z_decompress,
  537. .incomp = z_incomp,
  538. .decomp_stat = z_comp_stats,
  539. .owner = THIS_MODULE
  540. };
  541. static int __init deflate_init(void)
  542. {
  543. int rc;
  544. rc = ppp_register_compressor(&ppp_deflate);
  545. if (rc)
  546. return rc;
  547. rc = ppp_register_compressor(&ppp_deflate_draft);
  548. if (rc) {
  549. ppp_unregister_compressor(&ppp_deflate);
  550. return rc;
  551. }
  552. pr_info("PPP Deflate Compression module registered\n");
  553. return 0;
  554. }
  555. static void __exit deflate_cleanup(void)
  556. {
  557. ppp_unregister_compressor(&ppp_deflate);
  558. ppp_unregister_compressor(&ppp_deflate_draft);
  559. }
  560. module_init(deflate_init);
  561. module_exit(deflate_cleanup);
  562. MODULE_LICENSE("Dual BSD/GPL");
  563. MODULE_ALIAS("ppp-compress-" __stringify(CI_DEFLATE));
  564. MODULE_ALIAS("ppp-compress-" __stringify(CI_DEFLATE_DRAFT));