diff options
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index ac85e9c532c2..bf6e8aff19d4 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -59,6 +59,9 @@ | |||
59 | #ifdef CONFIG_IPV6_TUNNEL | 59 | #ifdef CONFIG_IPV6_TUNNEL |
60 | #include <net/ip6_tunnel.h> | 60 | #include <net/ip6_tunnel.h> |
61 | #endif | 61 | #endif |
62 | #ifdef CONFIG_IPV6_MIP6 | ||
63 | #include <net/mip6.h> | ||
64 | #endif | ||
62 | 65 | ||
63 | #include <asm/uaccess.h> | 66 | #include <asm/uaccess.h> |
64 | #include <asm/system.h> | 67 | #include <asm/system.h> |
@@ -67,7 +70,7 @@ MODULE_AUTHOR("Cast of dozens"); | |||
67 | MODULE_DESCRIPTION("IPv6 protocol stack for Linux"); | 70 | MODULE_DESCRIPTION("IPv6 protocol stack for Linux"); |
68 | MODULE_LICENSE("GPL"); | 71 | MODULE_LICENSE("GPL"); |
69 | 72 | ||
70 | int sysctl_ipv6_bindv6only; | 73 | int sysctl_ipv6_bindv6only __read_mostly; |
71 | 74 | ||
72 | /* The inetsw table contains everything that inet_create needs to | 75 | /* The inetsw table contains everything that inet_create needs to |
73 | * build a new socket. | 76 | * build a new socket. |
@@ -637,6 +640,7 @@ int inet6_sk_rebuild_header(struct sock *sk) | |||
637 | fl.oif = sk->sk_bound_dev_if; | 640 | fl.oif = sk->sk_bound_dev_if; |
638 | fl.fl_ip_dport = inet->dport; | 641 | fl.fl_ip_dport = inet->dport; |
639 | fl.fl_ip_sport = inet->sport; | 642 | fl.fl_ip_sport = inet->sport; |
643 | security_sk_classify_flow(sk, &fl); | ||
640 | 644 | ||
641 | if (np->opt && np->opt->srcrt) { | 645 | if (np->opt && np->opt->srcrt) { |
642 | struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; | 646 | struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; |
@@ -658,7 +662,7 @@ int inet6_sk_rebuild_header(struct sock *sk) | |||
658 | return err; | 662 | return err; |
659 | } | 663 | } |
660 | 664 | ||
661 | __ip6_dst_store(sk, dst, NULL); | 665 | __ip6_dst_store(sk, dst, NULL, NULL); |
662 | } | 666 | } |
663 | 667 | ||
664 | return 0; | 668 | return 0; |
@@ -757,6 +761,8 @@ static int __init inet6_init(void) | |||
757 | struct list_head *r; | 761 | struct list_head *r; |
758 | int err; | 762 | int err; |
759 | 763 | ||
764 | BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb)); | ||
765 | |||
760 | #ifdef MODULE | 766 | #ifdef MODULE |
761 | #if 0 /* FIXME --RR */ | 767 | #if 0 /* FIXME --RR */ |
762 | if (!mod_member_present(&__this_module, can_unload)) | 768 | if (!mod_member_present(&__this_module, can_unload)) |
@@ -766,11 +772,6 @@ static int __init inet6_init(void) | |||
766 | #endif | 772 | #endif |
767 | #endif | 773 | #endif |
768 | 774 | ||
769 | if (sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb)) { | ||
770 | printk(KERN_CRIT "inet6_proto_init: size fault\n"); | ||
771 | return -EINVAL; | ||
772 | } | ||
773 | |||
774 | err = proto_register(&tcpv6_prot, 1); | 775 | err = proto_register(&tcpv6_prot, 1); |
775 | if (err) | 776 | if (err) |
776 | goto out; | 777 | goto out; |
@@ -856,6 +857,9 @@ static int __init inet6_init(void) | |||
856 | ipv6_frag_init(); | 857 | ipv6_frag_init(); |
857 | ipv6_nodata_init(); | 858 | ipv6_nodata_init(); |
858 | ipv6_destopt_init(); | 859 | ipv6_destopt_init(); |
860 | #ifdef CONFIG_IPV6_MIP6 | ||
861 | mip6_init(); | ||
862 | #endif | ||
859 | 863 | ||
860 | /* Init v6 transport protocols. */ | 864 | /* Init v6 transport protocols. */ |
861 | udpv6_init(); | 865 | udpv6_init(); |
@@ -919,6 +923,9 @@ static void __exit inet6_exit(void) | |||
919 | tcp6_proc_exit(); | 923 | tcp6_proc_exit(); |
920 | raw6_proc_exit(); | 924 | raw6_proc_exit(); |
921 | #endif | 925 | #endif |
926 | #ifdef CONFIG_IPV6_MIP6 | ||
927 | mip6_fini(); | ||
928 | #endif | ||
922 | /* Cleanup code parts. */ | 929 | /* Cleanup code parts. */ |
923 | sit_cleanup(); | 930 | sit_cleanup(); |
924 | ip6_flowlabel_cleanup(); | 931 | ip6_flowlabel_cleanup(); |