|
48 | 48 | #endif |
49 | 49 |
|
50 | 50 | #include <asm/uaccess.h> |
| 51 | +#include "ip6_offload.h" |
51 | 52 |
|
52 | 53 | int ipv6_find_tlv(struct sk_buff *skb, int offset, int type) |
53 | 54 | { |
@@ -528,53 +529,19 @@ static int ipv6_rthdr_rcv(struct sk_buff *skb) |
528 | 529 |
|
529 | 530 | static const struct inet6_protocol rthdr_protocol = { |
530 | 531 | .handler = ipv6_rthdr_rcv, |
531 | | - .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR, |
532 | | -}; |
533 | | - |
534 | | -static const struct net_offload rthdr_offload = { |
535 | | - .flags = INET6_PROTO_GSO_EXTHDR, |
| 532 | + .flags = INET6_PROTO_NOPOLICY, |
536 | 533 | }; |
537 | 534 |
|
538 | 535 | static const struct inet6_protocol destopt_protocol = { |
539 | 536 | .handler = ipv6_destopt_rcv, |
540 | | - .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR, |
541 | | -}; |
542 | | - |
543 | | -static const struct net_offload dstopt_offload = { |
544 | | - .flags = INET6_PROTO_GSO_EXTHDR, |
| 537 | + .flags = INET6_PROTO_NOPOLICY, |
545 | 538 | }; |
546 | 539 |
|
547 | 540 | static const struct inet6_protocol nodata_protocol = { |
548 | 541 | .handler = dst_discard, |
549 | 542 | .flags = INET6_PROTO_NOPOLICY, |
550 | 543 | }; |
551 | 544 |
|
552 | | -static int ipv6_exthdrs_offload_init(void) |
553 | | -{ |
554 | | - int ret; |
555 | | - |
556 | | - ret = inet6_add_offload(&rthdr_offload, IPPROTO_ROUTING); |
557 | | - if (!ret) |
558 | | - goto out; |
559 | | - |
560 | | - ret = inet6_add_offload(&dstopt_offload, IPPROTO_DSTOPTS); |
561 | | - if (!ret) |
562 | | - goto out_rt; |
563 | | - |
564 | | -out: |
565 | | - return ret; |
566 | | - |
567 | | -out_rt: |
568 | | - inet_del_offload(&rthdr_offload, IPPROTO_ROUTING); |
569 | | - goto out; |
570 | | -} |
571 | | - |
572 | | -static void ipv6_exthdrs_offload_exit(void) |
573 | | -{ |
574 | | - inet_del_offload(&rthdr_offload, IPPROTO_ROUTING); |
575 | | - inet_del_offload(&rthdr_offload, IPPROTO_DSTOPTS); |
576 | | -} |
577 | | - |
578 | 545 | int __init ipv6_exthdrs_init(void) |
579 | 546 | { |
580 | 547 | int ret; |
@@ -608,6 +575,7 @@ int __init ipv6_exthdrs_init(void) |
608 | 575 |
|
609 | 576 | void ipv6_exthdrs_exit(void) |
610 | 577 | { |
| 578 | + ipv6_exthdrs_offload_exit(); |
611 | 579 | inet6_del_protocol(&nodata_protocol, IPPROTO_NONE); |
612 | 580 | inet6_del_protocol(&destopt_protocol, IPPROTO_DSTOPTS); |
613 | 581 | inet6_del_protocol(&rthdr_protocol, IPPROTO_ROUTING); |
|
0 commit comments