aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/exthdrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r--net/ipv6/exthdrs.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index a786a20ad823..473f628f9f20 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -48,7 +48,6 @@
48#endif 48#endif
49 49
50#include <asm/uaccess.h> 50#include <asm/uaccess.h>
51#include "ip6_offload.h"
52 51
53/* 52/*
54 * Parsing tlv encoded headers. 53 * Parsing tlv encoded headers.
@@ -502,13 +501,9 @@ int __init ipv6_exthdrs_init(void)
502{ 501{
503 int ret; 502 int ret;
504 503
505 ret = ipv6_exthdrs_offload_init();
506 if (ret)
507 goto out;
508
509 ret = inet6_add_protocol(&rthdr_protocol, IPPROTO_ROUTING); 504 ret = inet6_add_protocol(&rthdr_protocol, IPPROTO_ROUTING);
510 if (ret) 505 if (ret)
511 goto out_offload; 506 goto out;
512 507
513 ret = inet6_add_protocol(&destopt_protocol, IPPROTO_DSTOPTS); 508 ret = inet6_add_protocol(&destopt_protocol, IPPROTO_DSTOPTS);
514 if (ret) 509 if (ret)
@@ -524,14 +519,11 @@ out_destopt:
524 inet6_del_protocol(&destopt_protocol, IPPROTO_DSTOPTS); 519 inet6_del_protocol(&destopt_protocol, IPPROTO_DSTOPTS);
525out_rthdr: 520out_rthdr:
526 inet6_del_protocol(&rthdr_protocol, IPPROTO_ROUTING); 521 inet6_del_protocol(&rthdr_protocol, IPPROTO_ROUTING);
527out_offload:
528 ipv6_exthdrs_offload_exit();
529 goto out; 522 goto out;
530}; 523};
531 524
532void ipv6_exthdrs_exit(void) 525void ipv6_exthdrs_exit(void)
533{ 526{
534 ipv6_exthdrs_offload_exit();
535 inet6_del_protocol(&nodata_protocol, IPPROTO_NONE); 527 inet6_del_protocol(&nodata_protocol, IPPROTO_NONE);
536 inet6_del_protocol(&destopt_protocol, IPPROTO_DSTOPTS); 528 inet6_del_protocol(&destopt_protocol, IPPROTO_DSTOPTS);
537 inet6_del_protocol(&rthdr_protocol, IPPROTO_ROUTING); 529 inet6_del_protocol(&rthdr_protocol, IPPROTO_ROUTING);