gre_demux.c (38fd2c202a3d82bc12430bce5789fa2c2a406f71) gre_demux.c (438e38fadca2f6e57eeecc08326c8a95758594d4)
1/*
2 * GRE over IPv4 demultiplexer driver
3 *
4 * Authors: Dmitry Kozlov (xeb@mail.ru)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 341 unchanged lines hidden (view full) ---

350 goto err;
351 }
352
353 if (gre_add_protocol(&ipgre_protocol, GREPROTO_CISCO) < 0) {
354 pr_info("%s: can't add ipgre handler\n", __func__);
355 goto err_gre;
356 }
357
1/*
2 * GRE over IPv4 demultiplexer driver
3 *
4 * Authors: Dmitry Kozlov (xeb@mail.ru)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 341 unchanged lines hidden (view full) ---

350 goto err;
351 }
352
353 if (gre_add_protocol(&ipgre_protocol, GREPROTO_CISCO) < 0) {
354 pr_info("%s: can't add ipgre handler\n", __func__);
355 goto err_gre;
356 }
357
358 if (gre_offload_init()) {
359 pr_err("can't add protocol offload\n");
360 goto err_gso;
361 }
362
363 return 0;
358 return 0;
364err_gso:
365 gre_del_protocol(&ipgre_protocol, GREPROTO_CISCO);
366err_gre:
367 inet_del_protocol(&net_gre_protocol, IPPROTO_GRE);
368err:
369 return -EAGAIN;
370}
371
372static void __exit gre_exit(void)
373{
359err_gre:
360 inet_del_protocol(&net_gre_protocol, IPPROTO_GRE);
361err:
362 return -EAGAIN;
363}
364
365static void __exit gre_exit(void)
366{
374 gre_offload_exit();
375
376 gre_del_protocol(&ipgre_protocol, GREPROTO_CISCO);
377 inet_del_protocol(&net_gre_protocol, IPPROTO_GRE);
378}
379
380module_init(gre_init);
381module_exit(gre_exit);
382
383MODULE_DESCRIPTION("GRE over IPv4 demultiplexer driver");
384MODULE_AUTHOR("D. Kozlov (xeb@mail.ru)");
385MODULE_LICENSE("GPL");
367 gre_del_protocol(&ipgre_protocol, GREPROTO_CISCO);
368 inet_del_protocol(&net_gre_protocol, IPPROTO_GRE);
369}
370
371module_init(gre_init);
372module_exit(gre_exit);
373
374MODULE_DESCRIPTION("GRE over IPv4 demultiplexer driver");
375MODULE_AUTHOR("D. Kozlov (xeb@mail.ru)");
376MODULE_LICENSE("GPL");