diff options
Diffstat (limited to 'net/ipv4')
36 files changed, 92 insertions, 52 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 0ffd2d2920..1a3488a83f 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -78,7 +78,6 @@ | |||
78 | #include <linux/types.h> | 78 | #include <linux/types.h> |
79 | #include <linux/string.h> | 79 | #include <linux/string.h> |
80 | #include <linux/kernel.h> | 80 | #include <linux/kernel.h> |
81 | #include <linux/sched.h> | ||
82 | #include <linux/capability.h> | 81 | #include <linux/capability.h> |
83 | #include <linux/socket.h> | 82 | #include <linux/socket.h> |
84 | #include <linux/sockios.h> | 83 | #include <linux/sockios.h> |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index ba5e7f4cd1..8a0ec10a13 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | #include <linux/sched.h> | ||
39 | #include <linux/string.h> | 38 | #include <linux/string.h> |
40 | #include <linux/mm.h> | 39 | #include <linux/mm.h> |
41 | #include <linux/socket.h> | 40 | #include <linux/socket.h> |
@@ -1577,7 +1576,6 @@ static void devinet_sysctl_register(struct in_device *in_dev, | |||
1577 | return; | 1576 | return; |
1578 | for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) { | 1577 | for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) { |
1579 | t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf; | 1578 | t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf; |
1580 | t->devinet_vars[i].de = NULL; | ||
1581 | } | 1579 | } |
1582 | 1580 | ||
1583 | if (dev) { | 1581 | if (dev) { |
@@ -1599,15 +1597,11 @@ static void devinet_sysctl_register(struct in_device *in_dev, | |||
1599 | 1597 | ||
1600 | t->devinet_dev[0].procname = dev_name; | 1598 | t->devinet_dev[0].procname = dev_name; |
1601 | t->devinet_dev[0].child = t->devinet_vars; | 1599 | t->devinet_dev[0].child = t->devinet_vars; |
1602 | t->devinet_dev[0].de = NULL; | ||
1603 | t->devinet_conf_dir[0].child = t->devinet_dev; | 1600 | t->devinet_conf_dir[0].child = t->devinet_dev; |
1604 | t->devinet_conf_dir[0].de = NULL; | ||
1605 | t->devinet_proto_dir[0].child = t->devinet_conf_dir; | 1601 | t->devinet_proto_dir[0].child = t->devinet_conf_dir; |
1606 | t->devinet_proto_dir[0].de = NULL; | ||
1607 | t->devinet_root_dir[0].child = t->devinet_proto_dir; | 1602 | t->devinet_root_dir[0].child = t->devinet_proto_dir; |
1608 | t->devinet_root_dir[0].de = NULL; | ||
1609 | 1603 | ||
1610 | t->sysctl_header = register_sysctl_table(t->devinet_root_dir, 0); | 1604 | t->sysctl_header = register_sysctl_table(t->devinet_root_dir); |
1611 | if (!t->sysctl_header) | 1605 | if (!t->sysctl_header) |
1612 | goto free_procname; | 1606 | goto free_procname; |
1613 | 1607 | ||
@@ -1641,7 +1635,7 @@ void __init devinet_init(void) | |||
1641 | rtnetlink_links[PF_INET] = inet_rtnetlink_table; | 1635 | rtnetlink_links[PF_INET] = inet_rtnetlink_table; |
1642 | #ifdef CONFIG_SYSCTL | 1636 | #ifdef CONFIG_SYSCTL |
1643 | devinet_sysctl.sysctl_header = | 1637 | devinet_sysctl.sysctl_header = |
1644 | register_sysctl_table(devinet_sysctl.devinet_root_dir, 0); | 1638 | register_sysctl_table(devinet_sysctl.devinet_root_dir); |
1645 | devinet_sysctl_register(NULL, &ipv4_devconf_dflt); | 1639 | devinet_sysctl_register(NULL, &ipv4_devconf_dflt); |
1646 | #endif | 1640 | #endif |
1647 | } | 1641 | } |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 64f31e63db..1fba6439fc 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/capability.h> | 22 | #include <linux/capability.h> |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/sched.h> | ||
26 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
27 | #include <linux/string.h> | 26 | #include <linux/string.h> |
28 | #include <linux/socket.h> | 27 | #include <linux/socket.h> |
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index b21bb28d1f..a4949f957a 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/bitops.h> | 20 | #include <linux/bitops.h> |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/sched.h> | ||
24 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
25 | #include <linux/string.h> | 24 | #include <linux/string.h> |
26 | #include <linux/socket.h> | 25 | #include <linux/socket.h> |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index c33dca0738..72b3036bbc 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <asm/bitops.h> | 57 | #include <asm/bitops.h> |
58 | #include <linux/types.h> | 58 | #include <linux/types.h> |
59 | #include <linux/kernel.h> | 59 | #include <linux/kernel.h> |
60 | #include <linux/sched.h> | ||
61 | #include <linux/mm.h> | 60 | #include <linux/mm.h> |
62 | #include <linux/string.h> | 61 | #include <linux/string.h> |
63 | #include <linux/socket.h> | 62 | #include <linux/socket.h> |
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index 711eb6d028..db3ef96bdf 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/random.h> | 16 | #include <linux/random.h> |
17 | #include <linux/sched.h> | ||
18 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
19 | #include <linux/time.h> | 18 | #include <linux/time.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index c3ea0cd2e5..369e721c4b 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/sched.h> | ||
27 | #include <linux/skbuff.h> | 26 | #include <linux/skbuff.h> |
28 | #include <linux/ip.h> | 27 | #include <linux/ip.h> |
29 | #include <linux/icmp.h> | 28 | #include <linux/icmp.h> |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index f12c0d6623..9151da6423 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/capability.h> | 13 | #include <linux/capability.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/sched.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
19 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index bb0bb8f07c..d096332f6c 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include <linux/module.h> | 49 | #include <linux/module.h> |
50 | #include <linux/types.h> | 50 | #include <linux/types.h> |
51 | #include <linux/kernel.h> | 51 | #include <linux/kernel.h> |
52 | #include <linux/sched.h> | ||
53 | #include <linux/mm.h> | 52 | #include <linux/mm.h> |
54 | #include <linux/string.h> | 53 | #include <linux/string.h> |
55 | #include <linux/errno.h> | 54 | #include <linux/errno.h> |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index e120686c3c..23048d9f35 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/sched.h> | ||
24 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
25 | #include <linux/ip.h> | 24 | #include <linux/ip.h> |
26 | #include <linux/icmp.h> | 25 | #include <linux/icmp.h> |
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 475bcd1e41..3ec5ce0f54 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -96,7 +96,6 @@ | |||
96 | #include <linux/capability.h> | 96 | #include <linux/capability.h> |
97 | #include <linux/module.h> | 97 | #include <linux/module.h> |
98 | #include <linux/types.h> | 98 | #include <linux/types.h> |
99 | #include <linux/sched.h> | ||
100 | #include <linux/kernel.h> | 99 | #include <linux/kernel.h> |
101 | #include <asm/uaccess.h> | 100 | #include <asm/uaccess.h> |
102 | #include <linux/skbuff.h> | 101 | #include <linux/skbuff.h> |
@@ -871,7 +870,7 @@ static int __init ipip_init(void) | |||
871 | 870 | ||
872 | printk(banner); | 871 | printk(banner); |
873 | 872 | ||
874 | if (xfrm4_tunnel_register(&ipip_handler)) { | 873 | if (xfrm4_tunnel_register(&ipip_handler, AF_INET)) { |
875 | printk(KERN_INFO "ipip init: can't register tunnel\n"); | 874 | printk(KERN_INFO "ipip init: can't register tunnel\n"); |
876 | return -EAGAIN; | 875 | return -EAGAIN; |
877 | } | 876 | } |
@@ -893,7 +892,7 @@ static int __init ipip_init(void) | |||
893 | err2: | 892 | err2: |
894 | free_netdev(ipip_fb_tunnel_dev); | 893 | free_netdev(ipip_fb_tunnel_dev); |
895 | err1: | 894 | err1: |
896 | xfrm4_tunnel_deregister(&ipip_handler); | 895 | xfrm4_tunnel_deregister(&ipip_handler, AF_INET); |
897 | goto out; | 896 | goto out; |
898 | } | 897 | } |
899 | 898 | ||
@@ -913,7 +912,7 @@ static void __exit ipip_destroy_tunnels(void) | |||
913 | 912 | ||
914 | static void __exit ipip_fini(void) | 913 | static void __exit ipip_fini(void) |
915 | { | 914 | { |
916 | if (xfrm4_tunnel_deregister(&ipip_handler)) | 915 | if (xfrm4_tunnel_deregister(&ipip_handler, AF_INET)) |
917 | printk(KERN_INFO "ipip close: can't deregister tunnel\n"); | 916 | printk(KERN_INFO "ipip close: can't deregister tunnel\n"); |
918 | 917 | ||
919 | rtnl_lock(); | 918 | rtnl_lock(); |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index e6d11abd78..601e3df692 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/system.h> | 31 | #include <asm/system.h> |
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/sched.h> | ||
35 | #include <linux/capability.h> | 34 | #include <linux/capability.h> |
36 | #include <linux/errno.h> | 35 | #include <linux/errno.h> |
37 | #include <linux/timer.h> | 36 | #include <linux/timer.h> |
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index 8b08d9cdcb..b3050a6817 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c | |||
@@ -2359,7 +2359,7 @@ int ip_vs_control_init(void) | |||
2359 | proc_net_fops_create("ip_vs", 0, &ip_vs_info_fops); | 2359 | proc_net_fops_create("ip_vs", 0, &ip_vs_info_fops); |
2360 | proc_net_fops_create("ip_vs_stats",0, &ip_vs_stats_fops); | 2360 | proc_net_fops_create("ip_vs_stats",0, &ip_vs_stats_fops); |
2361 | 2361 | ||
2362 | sysctl_header = register_sysctl_table(vs_root_table, 0); | 2362 | sysctl_header = register_sysctl_table(vs_root_table); |
2363 | 2363 | ||
2364 | /* Initialize ip_vs_svc_table, ip_vs_svc_fwm_table, ip_vs_rtable */ | 2364 | /* Initialize ip_vs_svc_table, ip_vs_svc_fwm_table, ip_vs_rtable */ |
2365 | for(idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) { | 2365 | for(idx = 0; idx < IP_VS_SVC_TAB_SIZE; idx++) { |
diff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c index 76fd1fb918..c801273cb8 100644 --- a/net/ipv4/ipvs/ip_vs_lblc.c +++ b/net/ipv4/ipvs/ip_vs_lblc.c | |||
@@ -583,7 +583,7 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler = | |||
583 | static int __init ip_vs_lblc_init(void) | 583 | static int __init ip_vs_lblc_init(void) |
584 | { | 584 | { |
585 | INIT_LIST_HEAD(&ip_vs_lblc_scheduler.n_list); | 585 | INIT_LIST_HEAD(&ip_vs_lblc_scheduler.n_list); |
586 | sysctl_header = register_sysctl_table(lblc_root_table, 0); | 586 | sysctl_header = register_sysctl_table(lblc_root_table); |
587 | return register_ip_vs_scheduler(&ip_vs_lblc_scheduler); | 587 | return register_ip_vs_scheduler(&ip_vs_lblc_scheduler); |
588 | } | 588 | } |
589 | 589 | ||
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c index bf1e7f272b..23f9b9e73c 100644 --- a/net/ipv4/ipvs/ip_vs_lblcr.c +++ b/net/ipv4/ipvs/ip_vs_lblcr.c | |||
@@ -841,7 +841,7 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler = | |||
841 | static int __init ip_vs_lblcr_init(void) | 841 | static int __init ip_vs_lblcr_init(void) |
842 | { | 842 | { |
843 | INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list); | 843 | INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list); |
844 | sysctl_header = register_sysctl_table(lblcr_root_table, 0); | 844 | sysctl_header = register_sysctl_table(lblcr_root_table); |
845 | #ifdef CONFIG_IP_VS_LBLCR_DEBUG | 845 | #ifdef CONFIG_IP_VS_LBLCR_DEBUG |
846 | proc_net_create("ip_vs_lblcr", 0, ip_vs_lblcr_getinfo); | 846 | proc_net_create("ip_vs_lblcr", 0, ip_vs_lblcr_getinfo); |
847 | #endif | 847 | #endif |
diff --git a/net/ipv4/ipvs/ip_vs_sched.c b/net/ipv4/ipvs/ip_vs_sched.c index 8bc42b7622..1602304abb 100644 --- a/net/ipv4/ipvs/ip_vs_sched.c +++ b/net/ipv4/ipvs/ip_vs_sched.c | |||
@@ -20,7 +20,6 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/sched.h> | ||
24 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
25 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
26 | #include <asm/string.h> | 25 | #include <asm/string.h> |
diff --git a/net/ipv4/multipath_drr.c b/net/ipv4/multipath_drr.c index cb8fce4673..574c735836 100644 --- a/net/ipv4/multipath_drr.c +++ b/net/ipv4/multipath_drr.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/system.h> | 15 | #include <asm/system.h> |
16 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/sched.h> | ||
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
21 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
diff --git a/net/ipv4/multipath_random.c b/net/ipv4/multipath_random.c index 047e861f06..57f481498f 100644 --- a/net/ipv4/multipath_random.c +++ b/net/ipv4/multipath_random.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/system.h> | 15 | #include <asm/system.h> |
16 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/sched.h> | ||
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
21 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
diff --git a/net/ipv4/multipath_rr.c b/net/ipv4/multipath_rr.c index 896246d804..0ad22524f4 100644 --- a/net/ipv4/multipath_rr.c +++ b/net/ipv4/multipath_rr.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/system.h> | 15 | #include <asm/system.h> |
16 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/sched.h> | ||
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
21 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
diff --git a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c index 7e22f15d13..2bdbb92b45 100644 --- a/net/ipv4/multipath_wrandom.c +++ b/net/ipv4/multipath_wrandom.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/system.h> | 15 | #include <asm/system.h> |
16 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/sched.h> | ||
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
21 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_generic.c b/net/ipv4/netfilter/ip_conntrack_proto_generic.c index 36f2b5e5d8..88af82e986 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_generic.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_generic.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/sched.h> | ||
11 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
12 | #include <linux/netfilter.h> | 11 | #include <linux/netfilter.h> |
13 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> | 12 | #include <linux/netfilter_ipv4/ip_conntrack_protocol.h> |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c index ec71abead0..ad70c81a21 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/sched.h> | ||
11 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
12 | #include <linux/netfilter.h> | 11 | #include <linux/netfilter.h> |
13 | #include <linux/in.h> | 12 | #include <linux/in.h> |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c index 9d5b917f49..e6942992b2 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/sched.h> | ||
18 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
20 | #include <linux/netfilter.h> | 19 | #include <linux/netfilter.h> |
@@ -623,7 +622,7 @@ static int __init ip_conntrack_proto_sctp_init(void) | |||
623 | } | 622 | } |
624 | 623 | ||
625 | #ifdef CONFIG_SYSCTL | 624 | #ifdef CONFIG_SYSCTL |
626 | ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table, 0); | 625 | ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table); |
627 | if (ip_ct_sysctl_header == NULL) { | 626 | if (ip_ct_sysctl_header == NULL) { |
628 | ret = -ENOMEM; | 627 | ret = -ENOMEM; |
629 | printk("ip_conntrack_proto_sctp: can't register to sysctl.\n"); | 628 | printk("ip_conntrack_proto_sctp: can't register to sysctl.\n"); |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c index fa35b49fe2..170d625fad 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c | |||
@@ -20,7 +20,6 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/sched.h> | ||
24 | #include <linux/timer.h> | 23 | #include <linux/timer.h> |
25 | #include <linux/netfilter.h> | 24 | #include <linux/netfilter.h> |
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_udp.c b/net/ipv4/netfilter/ip_conntrack_proto_udp.c index a99a7c75e5..14c30c646c 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_udp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_udp.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/sched.h> | ||
11 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
12 | #include <linux/netfilter.h> | 11 | #include <linux/netfilter.h> |
13 | #include <linux/in.h> | 12 | #include <linux/in.h> |
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c index c7c1ec61b0..56b2f7546d 100644 --- a/net/ipv4/netfilter/ip_conntrack_standalone.c +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c | |||
@@ -848,7 +848,7 @@ static int __init ip_conntrack_standalone_init(void) | |||
848 | goto cleanup_proc_stat; | 848 | goto cleanup_proc_stat; |
849 | } | 849 | } |
850 | #ifdef CONFIG_SYSCTL | 850 | #ifdef CONFIG_SYSCTL |
851 | ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table, 0); | 851 | ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table); |
852 | if (ip_ct_sysctl_header == NULL) { | 852 | if (ip_ct_sysctl_header == NULL) { |
853 | printk("ip_conntrack: can't register to sysctl.\n"); | 853 | printk("ip_conntrack: can't register to sysctl.\n"); |
854 | ret = -ENOMEM; | 854 | ret = -ENOMEM; |
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 68bf19f3b0..a14798a850 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -693,7 +693,7 @@ static int __init ip_queue_init(void) | |||
693 | } | 693 | } |
694 | 694 | ||
695 | register_netdevice_notifier(&ipq_dev_notifier); | 695 | register_netdevice_notifier(&ipq_dev_notifier); |
696 | ipq_sysctl_header = register_sysctl_table(ipq_root_table, 0); | 696 | ipq_sysctl_header = register_sysctl_table(ipq_root_table); |
697 | 697 | ||
698 | status = nf_register_queue_handler(PF_INET, &nfqh); | 698 | status = nf_register_queue_handler(PF_INET, &nfqh); |
699 | if (status < 0) { | 699 | if (status < 0) { |
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index a9eb3635ff..80f739e218 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c | |||
@@ -80,6 +80,10 @@ static void send_reset(struct sk_buff *oldskb, int hook) | |||
80 | nskb->mark = 0; | 80 | nskb->mark = 0; |
81 | skb_init_secmark(nskb); | 81 | skb_init_secmark(nskb); |
82 | 82 | ||
83 | skb_shinfo(nskb)->gso_size = 0; | ||
84 | skb_shinfo(nskb)->gso_segs = 0; | ||
85 | skb_shinfo(nskb)->gso_type = 0; | ||
86 | |||
83 | tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl); | 87 | tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl); |
84 | 88 | ||
85 | /* Swap source and dest */ | 89 | /* Swap source and dest */ |
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index e5aa4d849b..88cfa6aacf 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/sched.h> | ||
16 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
17 | #include <linux/netfilter.h> | 16 | #include <linux/netfilter.h> |
18 | #include <linux/in.h> | 17 | #include <linux/in.h> |
diff --git a/net/ipv4/protocol.c b/net/ipv4/protocol.c index 6cd6340de8..da70fef82c 100644 --- a/net/ipv4/protocol.c +++ b/net/ipv4/protocol.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/sched.h> | ||
34 | #include <linux/string.h> | 33 | #include <linux/string.h> |
35 | #include <linux/socket.h> | 34 | #include <linux/socket.h> |
36 | #include <linux/in.h> | 35 | #include <linux/in.h> |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 9b5e56481d..37e0d4d5cf 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -70,7 +70,6 @@ | |||
70 | #include <linux/bitops.h> | 70 | #include <linux/bitops.h> |
71 | #include <linux/types.h> | 71 | #include <linux/types.h> |
72 | #include <linux/kernel.h> | 72 | #include <linux/kernel.h> |
73 | #include <linux/sched.h> | ||
74 | #include <linux/mm.h> | 73 | #include <linux/mm.h> |
75 | #include <linux/bootmem.h> | 74 | #include <linux/bootmem.h> |
76 | #include <linux/string.h> | 75 | #include <linux/string.h> |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index cebe9aa918..dc151139b5 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -481,7 +481,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
481 | /* RFC1323: The window in SYN & SYN/ACK segments | 481 | /* RFC1323: The window in SYN & SYN/ACK segments |
482 | * is never scaled. | 482 | * is never scaled. |
483 | */ | 483 | */ |
484 | th->window = htons(tp->rcv_wnd); | 484 | th->window = htons(min(tp->rcv_wnd, 65535U)); |
485 | } else { | 485 | } else { |
486 | th->window = htons(tcp_select_window(sk)); | 486 | th->window = htons(tcp_select_window(sk)); |
487 | } | 487 | } |
@@ -2160,7 +2160,7 @@ struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst, | |||
2160 | } | 2160 | } |
2161 | 2161 | ||
2162 | /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ | 2162 | /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ |
2163 | th->window = htons(req->rcv_wnd); | 2163 | th->window = htons(min(req->rcv_wnd, 65535U)); |
2164 | 2164 | ||
2165 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | 2165 | TCP_SKB_CB(skb)->when = tcp_time_stamp; |
2166 | tcp_syn_build_options((__be32 *)(th + 1), dst_metric(dst, RTAX_ADVMSS), ireq->tstamp_ok, | 2166 | tcp_syn_build_options((__be32 *)(th + 1), dst_metric(dst, RTAX_ADVMSS), ireq->tstamp_ok, |
diff --git a/net/ipv4/tunnel4.c b/net/ipv4/tunnel4.c index 8d30c48f09..a794a8ca8b 100644 --- a/net/ipv4/tunnel4.c +++ b/net/ipv4/tunnel4.c | |||
@@ -14,9 +14,10 @@ | |||
14 | #include <net/xfrm.h> | 14 | #include <net/xfrm.h> |
15 | 15 | ||
16 | static struct xfrm_tunnel *tunnel4_handlers; | 16 | static struct xfrm_tunnel *tunnel4_handlers; |
17 | static struct xfrm_tunnel *tunnel64_handlers; | ||
17 | static DEFINE_MUTEX(tunnel4_mutex); | 18 | static DEFINE_MUTEX(tunnel4_mutex); |
18 | 19 | ||
19 | int xfrm4_tunnel_register(struct xfrm_tunnel *handler) | 20 | int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family) |
20 | { | 21 | { |
21 | struct xfrm_tunnel **pprev; | 22 | struct xfrm_tunnel **pprev; |
22 | int ret = -EEXIST; | 23 | int ret = -EEXIST; |
@@ -24,7 +25,8 @@ int xfrm4_tunnel_register(struct xfrm_tunnel *handler) | |||
24 | 25 | ||
25 | mutex_lock(&tunnel4_mutex); | 26 | mutex_lock(&tunnel4_mutex); |
26 | 27 | ||
27 | for (pprev = &tunnel4_handlers; *pprev; pprev = &(*pprev)->next) { | 28 | for (pprev = (family == AF_INET) ? &tunnel4_handlers : &tunnel64_handlers; |
29 | *pprev; pprev = &(*pprev)->next) { | ||
28 | if ((*pprev)->priority > priority) | 30 | if ((*pprev)->priority > priority) |
29 | break; | 31 | break; |
30 | if ((*pprev)->priority == priority) | 32 | if ((*pprev)->priority == priority) |
@@ -44,14 +46,15 @@ err: | |||
44 | 46 | ||
45 | EXPORT_SYMBOL(xfrm4_tunnel_register); | 47 | EXPORT_SYMBOL(xfrm4_tunnel_register); |
46 | 48 | ||
47 | int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler) | 49 | int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family) |
48 | { | 50 | { |
49 | struct xfrm_tunnel **pprev; | 51 | struct xfrm_tunnel **pprev; |
50 | int ret = -ENOENT; | 52 | int ret = -ENOENT; |
51 | 53 | ||
52 | mutex_lock(&tunnel4_mutex); | 54 | mutex_lock(&tunnel4_mutex); |
53 | 55 | ||
54 | for (pprev = &tunnel4_handlers; *pprev; pprev = &(*pprev)->next) { | 56 | for (pprev = (family == AF_INET) ? &tunnel4_handlers : &tunnel64_handlers; |
57 | *pprev; pprev = &(*pprev)->next) { | ||
55 | if (*pprev == handler) { | 58 | if (*pprev == handler) { |
56 | *pprev = handler->next; | 59 | *pprev = handler->next; |
57 | ret = 0; | 60 | ret = 0; |
@@ -86,6 +89,26 @@ drop: | |||
86 | return 0; | 89 | return 0; |
87 | } | 90 | } |
88 | 91 | ||
92 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
93 | static int tunnel64_rcv(struct sk_buff *skb) | ||
94 | { | ||
95 | struct xfrm_tunnel *handler; | ||
96 | |||
97 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) | ||
98 | goto drop; | ||
99 | |||
100 | for (handler = tunnel64_handlers; handler; handler = handler->next) | ||
101 | if (!handler->handler(skb)) | ||
102 | return 0; | ||
103 | |||
104 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); | ||
105 | |||
106 | drop: | ||
107 | kfree_skb(skb); | ||
108 | return 0; | ||
109 | } | ||
110 | #endif | ||
111 | |||
89 | static void tunnel4_err(struct sk_buff *skb, u32 info) | 112 | static void tunnel4_err(struct sk_buff *skb, u32 info) |
90 | { | 113 | { |
91 | struct xfrm_tunnel *handler; | 114 | struct xfrm_tunnel *handler; |
@@ -101,17 +124,36 @@ static struct net_protocol tunnel4_protocol = { | |||
101 | .no_policy = 1, | 124 | .no_policy = 1, |
102 | }; | 125 | }; |
103 | 126 | ||
127 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
128 | static struct net_protocol tunnel64_protocol = { | ||
129 | .handler = tunnel64_rcv, | ||
130 | .err_handler = tunnel4_err, | ||
131 | .no_policy = 1, | ||
132 | }; | ||
133 | #endif | ||
134 | |||
104 | static int __init tunnel4_init(void) | 135 | static int __init tunnel4_init(void) |
105 | { | 136 | { |
106 | if (inet_add_protocol(&tunnel4_protocol, IPPROTO_IPIP)) { | 137 | if (inet_add_protocol(&tunnel4_protocol, IPPROTO_IPIP)) { |
107 | printk(KERN_ERR "tunnel4 init: can't add protocol\n"); | 138 | printk(KERN_ERR "tunnel4 init: can't add protocol\n"); |
108 | return -EAGAIN; | 139 | return -EAGAIN; |
109 | } | 140 | } |
141 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
142 | if (inet_add_protocol(&tunnel64_protocol, IPPROTO_IPV6)) { | ||
143 | printk(KERN_ERR "tunnel64 init: can't add protocol\n"); | ||
144 | inet_del_protocol(&tunnel4_protocol, IPPROTO_IPIP); | ||
145 | return -EAGAIN; | ||
146 | } | ||
147 | #endif | ||
110 | return 0; | 148 | return 0; |
111 | } | 149 | } |
112 | 150 | ||
113 | static void __exit tunnel4_fini(void) | 151 | static void __exit tunnel4_fini(void) |
114 | { | 152 | { |
153 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
154 | if (inet_del_protocol(&tunnel64_protocol, IPPROTO_IPV6)) | ||
155 | printk(KERN_ERR "tunnel64 close: can't remove protocol\n"); | ||
156 | #endif | ||
115 | if (inet_del_protocol(&tunnel4_protocol, IPPROTO_IPIP)) | 157 | if (inet_del_protocol(&tunnel4_protocol, IPPROTO_IPIP)) |
116 | printk(KERN_ERR "tunnel4 close: can't remove protocol\n"); | 158 | printk(KERN_ERR "tunnel4 close: can't remove protocol\n"); |
117 | } | 159 | } |
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index 289146bdb8..78e80deb7e 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c | |||
@@ -27,6 +27,7 @@ static int xfrm4_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 | |||
27 | { | 27 | { |
28 | switch (nexthdr) { | 28 | switch (nexthdr) { |
29 | case IPPROTO_IPIP: | 29 | case IPPROTO_IPIP: |
30 | case IPPROTO_IPV6: | ||
30 | *spi = skb->nh.iph->saddr; | 31 | *spi = skb->nh.iph->saddr; |
31 | *seq = 0; | 32 | *seq = 0; |
32 | return 0; | 33 | return 0; |
@@ -70,7 +71,8 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) | |||
70 | if (xfrm_nr == XFRM_MAX_DEPTH) | 71 | if (xfrm_nr == XFRM_MAX_DEPTH) |
71 | goto drop; | 72 | goto drop; |
72 | 73 | ||
73 | x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, spi, iph->protocol, AF_INET); | 74 | x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, spi, |
75 | iph->protocol != IPPROTO_IPV6 ? iph->protocol : IPPROTO_IPIP, AF_INET); | ||
74 | if (x == NULL) | 76 | if (x == NULL) |
75 | goto drop; | 77 | goto drop; |
76 | 78 | ||
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index e54c5494c8..e1cab33fda 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
@@ -95,6 +95,7 @@ static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) | |||
95 | 95 | ||
96 | switch(iph->protocol){ | 96 | switch(iph->protocol){ |
97 | case IPPROTO_IPIP: | 97 | case IPPROTO_IPIP: |
98 | break; | ||
98 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 99 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) |
99 | case IPPROTO_IPV6: | 100 | case IPPROTO_IPV6: |
100 | break; | 101 | break; |
diff --git a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c index 1be6762b2d..3eef06454d 100644 --- a/net/ipv4/xfrm4_tunnel.c +++ b/net/ipv4/xfrm4_tunnel.c | |||
@@ -64,24 +64,45 @@ static struct xfrm_tunnel xfrm_tunnel_handler = { | |||
64 | .priority = 2, | 64 | .priority = 2, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
68 | static struct xfrm_tunnel xfrm64_tunnel_handler = { | ||
69 | .handler = xfrm4_rcv, | ||
70 | .err_handler = xfrm_tunnel_err, | ||
71 | .priority = 2, | ||
72 | }; | ||
73 | #endif | ||
74 | |||
67 | static int __init ipip_init(void) | 75 | static int __init ipip_init(void) |
68 | { | 76 | { |
69 | if (xfrm_register_type(&ipip_type, AF_INET) < 0) { | 77 | if (xfrm_register_type(&ipip_type, AF_INET) < 0) { |
70 | printk(KERN_INFO "ipip init: can't add xfrm type\n"); | 78 | printk(KERN_INFO "ipip init: can't add xfrm type\n"); |
71 | return -EAGAIN; | 79 | return -EAGAIN; |
72 | } | 80 | } |
73 | if (xfrm4_tunnel_register(&xfrm_tunnel_handler)) { | 81 | |
74 | printk(KERN_INFO "ipip init: can't add xfrm handler\n"); | 82 | if (xfrm4_tunnel_register(&xfrm_tunnel_handler, AF_INET)) { |
83 | printk(KERN_INFO "ipip init: can't add xfrm handler for AF_INET\n"); | ||
84 | xfrm_unregister_type(&ipip_type, AF_INET); | ||
85 | return -EAGAIN; | ||
86 | } | ||
87 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
88 | if (xfrm4_tunnel_register(&xfrm64_tunnel_handler, AF_INET6)) { | ||
89 | printk(KERN_INFO "ipip init: can't add xfrm handler for AF_INET6\n"); | ||
90 | xfrm4_tunnel_deregister(&xfrm_tunnel_handler, AF_INET); | ||
75 | xfrm_unregister_type(&ipip_type, AF_INET); | 91 | xfrm_unregister_type(&ipip_type, AF_INET); |
76 | return -EAGAIN; | 92 | return -EAGAIN; |
77 | } | 93 | } |
94 | #endif | ||
78 | return 0; | 95 | return 0; |
79 | } | 96 | } |
80 | 97 | ||
81 | static void __exit ipip_fini(void) | 98 | static void __exit ipip_fini(void) |
82 | { | 99 | { |
83 | if (xfrm4_tunnel_deregister(&xfrm_tunnel_handler)) | 100 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
84 | printk(KERN_INFO "ipip close: can't remove xfrm handler\n"); | 101 | if (xfrm4_tunnel_deregister(&xfrm64_tunnel_handler, AF_INET6)) |
102 | printk(KERN_INFO "ipip close: can't remove xfrm handler for AF_INET6\n"); | ||
103 | #endif | ||
104 | if (xfrm4_tunnel_deregister(&xfrm_tunnel_handler, AF_INET)) | ||
105 | printk(KERN_INFO "ipip close: can't remove xfrm handler for AF_INET\n"); | ||
85 | if (xfrm_unregister_type(&ipip_type, AF_INET) < 0) | 106 | if (xfrm_unregister_type(&ipip_type, AF_INET) < 0) |
86 | printk(KERN_INFO "ipip close: can't remove xfrm type\n"); | 107 | printk(KERN_INFO "ipip close: can't remove xfrm type\n"); |
87 | } | 108 | } |