diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-17 23:53:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-17 23:53:52 -0400 |
commit | f205ce83a766c08965ec78342f138cdc00631fba (patch) | |
tree | 7a9d2db6c16594ef7c730ca93a87131cf0abca41 /net/ipv6 | |
parent | 3dc95666df0e1ae5b7381a8ec97a583bb3ce4306 (diff) | |
parent | b31c50a7f9e93a61d14740dedcbbf2c376998bc7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits)
be2net: fix some cmds to use mccq instead of mbox
atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
pkt_sched: Fix qstats.qlen updating in dump_stats
ipv6: Log the affected address when DAD failure occurs
wl12xx: Fix print_mac() conversion.
af_iucv: fix race when queueing skbs on the backlog queue
af_iucv: do not call iucv_sock_kill() twice
af_iucv: handle non-accepted sockets after resuming from suspend
af_iucv: fix race in __iucv_sock_wait()
iucv: use correct output register in iucv_query_maxconn()
iucv: fix iucv_buffer_cpumask check when calling IUCV functions
iucv: suspend/resume error msg for left over pathes
wl12xx: switch to %pM to print the mac address
b44: the poll handler b44_poll must not enable IRQ unconditionally
ipv6: Ignore route option with ROUTER_PREF_INVALID
bonding: make ab_arp select active slaves as other modes
cfg80211: fix SME connect
rc80211_minstrel: fix contention window calculation
ssb/sdio: fix printk format warnings
p54usb: add Zcomax XG-705A usbid
...
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 23 | ||||
-rw-r--r-- | net/ipv6/af_inet6.c | 10 | ||||
-rw-r--r-- | net/ipv6/ah6.c | 2 | ||||
-rw-r--r-- | net/ipv6/esp6.c | 2 | ||||
-rw-r--r-- | net/ipv6/exthdrs.c | 6 | ||||
-rw-r--r-- | net/ipv6/icmp.c | 4 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 2 | ||||
-rw-r--r-- | net/ipv6/ip6mr.c | 6 | ||||
-rw-r--r-- | net/ipv6/ipcomp6.c | 2 | ||||
-rw-r--r-- | net/ipv6/mcast.c | 19 | ||||
-rw-r--r-- | net/ipv6/protocol.c | 6 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 2 | ||||
-rw-r--r-- | net/ipv6/route.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 7 | ||||
-rw-r--r-- | net/ipv6/tunnel6.c | 4 | ||||
-rw-r--r-- | net/ipv6/udp.c | 2 | ||||
-rw-r--r-- | net/ipv6/udplite.c | 2 |
17 files changed, 68 insertions, 33 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index c9b369034a40..55f486d89c88 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -137,6 +137,8 @@ static DEFINE_SPINLOCK(addrconf_verify_lock); | |||
137 | static void addrconf_join_anycast(struct inet6_ifaddr *ifp); | 137 | static void addrconf_join_anycast(struct inet6_ifaddr *ifp); |
138 | static void addrconf_leave_anycast(struct inet6_ifaddr *ifp); | 138 | static void addrconf_leave_anycast(struct inet6_ifaddr *ifp); |
139 | 139 | ||
140 | static void addrconf_bonding_change(struct net_device *dev, | ||
141 | unsigned long event); | ||
140 | static int addrconf_ifdown(struct net_device *dev, int how); | 142 | static int addrconf_ifdown(struct net_device *dev, int how); |
141 | 143 | ||
142 | static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags); | 144 | static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags); |
@@ -1405,8 +1407,8 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp) | |||
1405 | struct inet6_dev *idev = ifp->idev; | 1407 | struct inet6_dev *idev = ifp->idev; |
1406 | 1408 | ||
1407 | if (net_ratelimit()) | 1409 | if (net_ratelimit()) |
1408 | printk(KERN_INFO "%s: IPv6 duplicate address detected!\n", | 1410 | printk(KERN_INFO "%s: IPv6 duplicate address %pI6c detected!\n", |
1409 | ifp->idev->dev->name); | 1411 | ifp->idev->dev->name, &ifp->addr); |
1410 | 1412 | ||
1411 | if (idev->cnf.accept_dad > 1 && !idev->cnf.disable_ipv6) { | 1413 | if (idev->cnf.accept_dad > 1 && !idev->cnf.disable_ipv6) { |
1412 | struct in6_addr addr; | 1414 | struct in6_addr addr; |
@@ -2582,6 +2584,10 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, | |||
2582 | return notifier_from_errno(err); | 2584 | return notifier_from_errno(err); |
2583 | } | 2585 | } |
2584 | break; | 2586 | break; |
2587 | case NETDEV_BONDING_OLDTYPE: | ||
2588 | case NETDEV_BONDING_NEWTYPE: | ||
2589 | addrconf_bonding_change(dev, event); | ||
2590 | break; | ||
2585 | } | 2591 | } |
2586 | 2592 | ||
2587 | return NOTIFY_OK; | 2593 | return NOTIFY_OK; |
@@ -2595,6 +2601,19 @@ static struct notifier_block ipv6_dev_notf = { | |||
2595 | .priority = 0 | 2601 | .priority = 0 |
2596 | }; | 2602 | }; |
2597 | 2603 | ||
2604 | static void addrconf_bonding_change(struct net_device *dev, unsigned long event) | ||
2605 | { | ||
2606 | struct inet6_dev *idev; | ||
2607 | ASSERT_RTNL(); | ||
2608 | |||
2609 | idev = __in6_dev_get(dev); | ||
2610 | |||
2611 | if (event == NETDEV_BONDING_NEWTYPE) | ||
2612 | ipv6_mc_remap(idev); | ||
2613 | else if (event == NETDEV_BONDING_OLDTYPE) | ||
2614 | ipv6_mc_unmap(idev); | ||
2615 | } | ||
2616 | |||
2598 | static int addrconf_ifdown(struct net_device *dev, int how) | 2617 | static int addrconf_ifdown(struct net_device *dev, int how) |
2599 | { | 2618 | { |
2600 | struct inet6_dev *idev; | 2619 | struct inet6_dev *idev; |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index a123a328aeb3..e127a32f9540 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -710,7 +710,7 @@ EXPORT_SYMBOL_GPL(ipv6_opt_accepted); | |||
710 | 710 | ||
711 | static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto) | 711 | static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto) |
712 | { | 712 | { |
713 | struct inet6_protocol *ops = NULL; | 713 | const struct inet6_protocol *ops = NULL; |
714 | 714 | ||
715 | for (;;) { | 715 | for (;;) { |
716 | struct ipv6_opt_hdr *opth; | 716 | struct ipv6_opt_hdr *opth; |
@@ -745,7 +745,7 @@ static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto) | |||
745 | static int ipv6_gso_send_check(struct sk_buff *skb) | 745 | static int ipv6_gso_send_check(struct sk_buff *skb) |
746 | { | 746 | { |
747 | struct ipv6hdr *ipv6h; | 747 | struct ipv6hdr *ipv6h; |
748 | struct inet6_protocol *ops; | 748 | const struct inet6_protocol *ops; |
749 | int err = -EINVAL; | 749 | int err = -EINVAL; |
750 | 750 | ||
751 | if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) | 751 | if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) |
@@ -773,7 +773,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features) | |||
773 | { | 773 | { |
774 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 774 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
775 | struct ipv6hdr *ipv6h; | 775 | struct ipv6hdr *ipv6h; |
776 | struct inet6_protocol *ops; | 776 | const struct inet6_protocol *ops; |
777 | int proto; | 777 | int proto; |
778 | struct frag_hdr *fptr; | 778 | struct frag_hdr *fptr; |
779 | unsigned int unfrag_ip6hlen; | 779 | unsigned int unfrag_ip6hlen; |
@@ -840,7 +840,7 @@ struct ipv6_gro_cb { | |||
840 | static struct sk_buff **ipv6_gro_receive(struct sk_buff **head, | 840 | static struct sk_buff **ipv6_gro_receive(struct sk_buff **head, |
841 | struct sk_buff *skb) | 841 | struct sk_buff *skb) |
842 | { | 842 | { |
843 | struct inet6_protocol *ops; | 843 | const struct inet6_protocol *ops; |
844 | struct sk_buff **pp = NULL; | 844 | struct sk_buff **pp = NULL; |
845 | struct sk_buff *p; | 845 | struct sk_buff *p; |
846 | struct ipv6hdr *iph; | 846 | struct ipv6hdr *iph; |
@@ -926,7 +926,7 @@ out: | |||
926 | 926 | ||
927 | static int ipv6_gro_complete(struct sk_buff *skb) | 927 | static int ipv6_gro_complete(struct sk_buff *skb) |
928 | { | 928 | { |
929 | struct inet6_protocol *ops; | 929 | const struct inet6_protocol *ops; |
930 | struct ipv6hdr *iph = ipv6_hdr(skb); | 930 | struct ipv6hdr *iph = ipv6_hdr(skb); |
931 | int err = -ENOSYS; | 931 | int err = -ENOSYS; |
932 | 932 | ||
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 86f42a288c4b..c1589e2f1dc9 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -527,7 +527,7 @@ static const struct xfrm_type ah6_type = | |||
527 | .hdr_offset = xfrm6_find_1stfragopt, | 527 | .hdr_offset = xfrm6_find_1stfragopt, |
528 | }; | 528 | }; |
529 | 529 | ||
530 | static struct inet6_protocol ah6_protocol = { | 530 | static const struct inet6_protocol ah6_protocol = { |
531 | .handler = xfrm6_rcv, | 531 | .handler = xfrm6_rcv, |
532 | .err_handler = ah6_err, | 532 | .err_handler = ah6_err, |
533 | .flags = INET6_PROTO_NOPOLICY, | 533 | .flags = INET6_PROTO_NOPOLICY, |
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 678bb95b1525..af597c73ebe9 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c | |||
@@ -558,7 +558,7 @@ static const struct xfrm_type esp6_type = | |||
558 | .hdr_offset = xfrm6_find_1stfragopt, | 558 | .hdr_offset = xfrm6_find_1stfragopt, |
559 | }; | 559 | }; |
560 | 560 | ||
561 | static struct inet6_protocol esp6_protocol = { | 561 | static const struct inet6_protocol esp6_protocol = { |
562 | .handler = xfrm6_rcv, | 562 | .handler = xfrm6_rcv, |
563 | .err_handler = esp6_err, | 563 | .err_handler = esp6_err, |
564 | .flags = INET6_PROTO_NOPOLICY, | 564 | .flags = INET6_PROTO_NOPOLICY, |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 4aae658e5501..df159fffe4bc 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -500,17 +500,17 @@ unknown_rh: | |||
500 | return -1; | 500 | return -1; |
501 | } | 501 | } |
502 | 502 | ||
503 | static struct inet6_protocol rthdr_protocol = { | 503 | static const struct inet6_protocol rthdr_protocol = { |
504 | .handler = ipv6_rthdr_rcv, | 504 | .handler = ipv6_rthdr_rcv, |
505 | .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR, | 505 | .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR, |
506 | }; | 506 | }; |
507 | 507 | ||
508 | static struct inet6_protocol destopt_protocol = { | 508 | static const struct inet6_protocol destopt_protocol = { |
509 | .handler = ipv6_destopt_rcv, | 509 | .handler = ipv6_destopt_rcv, |
510 | .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR, | 510 | .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR, |
511 | }; | 511 | }; |
512 | 512 | ||
513 | static struct inet6_protocol nodata_protocol = { | 513 | static const struct inet6_protocol nodata_protocol = { |
514 | .handler = dst_discard, | 514 | .handler = dst_discard, |
515 | .flags = INET6_PROTO_NOPOLICY, | 515 | .flags = INET6_PROTO_NOPOLICY, |
516 | }; | 516 | }; |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index e2325f6a05fb..f23ebbec0631 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -86,7 +86,7 @@ static inline struct sock *icmpv6_sk(struct net *net) | |||
86 | 86 | ||
87 | static int icmpv6_rcv(struct sk_buff *skb); | 87 | static int icmpv6_rcv(struct sk_buff *skb); |
88 | 88 | ||
89 | static struct inet6_protocol icmpv6_protocol = { | 89 | static const struct inet6_protocol icmpv6_protocol = { |
90 | .handler = icmpv6_rcv, | 90 | .handler = icmpv6_rcv, |
91 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, | 91 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, |
92 | }; | 92 | }; |
@@ -583,7 +583,7 @@ out: | |||
583 | 583 | ||
584 | static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info) | 584 | static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info) |
585 | { | 585 | { |
586 | struct inet6_protocol *ipprot; | 586 | const struct inet6_protocol *ipprot; |
587 | int inner_offset; | 587 | int inner_offset; |
588 | int hash; | 588 | int hash; |
589 | u8 nexthdr; | 589 | u8 nexthdr; |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 2d9cbaa67edb..237e2dba6e94 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -159,7 +159,7 @@ drop: | |||
159 | 159 | ||
160 | static int ip6_input_finish(struct sk_buff *skb) | 160 | static int ip6_input_finish(struct sk_buff *skb) |
161 | { | 161 | { |
162 | struct inet6_protocol *ipprot; | 162 | const struct inet6_protocol *ipprot; |
163 | unsigned int nhoff; | 163 | unsigned int nhoff; |
164 | int nexthdr, raw; | 164 | int nexthdr, raw; |
165 | u8 hash; | 165 | u8 hash; |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 5c8d73730c75..3907510c2ce3 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -83,10 +83,6 @@ static int ip6mr_cache_report(struct net *net, struct sk_buff *pkt, | |||
83 | static int ip6mr_fill_mroute(struct sk_buff *skb, struct mfc6_cache *c, struct rtmsg *rtm); | 83 | static int ip6mr_fill_mroute(struct sk_buff *skb, struct mfc6_cache *c, struct rtmsg *rtm); |
84 | static void mroute_clean_tables(struct net *net); | 84 | static void mroute_clean_tables(struct net *net); |
85 | 85 | ||
86 | #ifdef CONFIG_IPV6_PIMSM_V2 | ||
87 | static struct inet6_protocol pim6_protocol; | ||
88 | #endif | ||
89 | |||
90 | static struct timer_list ipmr_expire_timer; | 86 | static struct timer_list ipmr_expire_timer; |
91 | 87 | ||
92 | 88 | ||
@@ -410,7 +406,7 @@ static int pim6_rcv(struct sk_buff *skb) | |||
410 | return 0; | 406 | return 0; |
411 | } | 407 | } |
412 | 408 | ||
413 | static struct inet6_protocol pim6_protocol = { | 409 | static const struct inet6_protocol pim6_protocol = { |
414 | .handler = pim6_rcv, | 410 | .handler = pim6_rcv, |
415 | }; | 411 | }; |
416 | 412 | ||
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 79c172f1ff01..2f2a5ca2c878 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -178,7 +178,7 @@ static const struct xfrm_type ipcomp6_type = | |||
178 | .hdr_offset = xfrm6_find_1stfragopt, | 178 | .hdr_offset = xfrm6_find_1stfragopt, |
179 | }; | 179 | }; |
180 | 180 | ||
181 | static struct inet6_protocol ipcomp6_protocol = | 181 | static const struct inet6_protocol ipcomp6_protocol = |
182 | { | 182 | { |
183 | .handler = xfrm6_rcv, | 183 | .handler = xfrm6_rcv, |
184 | .err_handler = ipcomp6_err, | 184 | .err_handler = ipcomp6_err, |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 71c3dacec1ed..f9fcf690bd5d 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -2249,6 +2249,25 @@ static void igmp6_timer_handler(unsigned long data) | |||
2249 | ma_put(ma); | 2249 | ma_put(ma); |
2250 | } | 2250 | } |
2251 | 2251 | ||
2252 | /* Device changing type */ | ||
2253 | |||
2254 | void ipv6_mc_unmap(struct inet6_dev *idev) | ||
2255 | { | ||
2256 | struct ifmcaddr6 *i; | ||
2257 | |||
2258 | /* Install multicast list, except for all-nodes (already installed) */ | ||
2259 | |||
2260 | read_lock_bh(&idev->lock); | ||
2261 | for (i = idev->mc_list; i; i = i->next) | ||
2262 | igmp6_group_dropped(i); | ||
2263 | read_unlock_bh(&idev->lock); | ||
2264 | } | ||
2265 | |||
2266 | void ipv6_mc_remap(struct inet6_dev *idev) | ||
2267 | { | ||
2268 | ipv6_mc_up(idev); | ||
2269 | } | ||
2270 | |||
2252 | /* Device going down */ | 2271 | /* Device going down */ |
2253 | 2272 | ||
2254 | void ipv6_mc_down(struct inet6_dev *idev) | 2273 | void ipv6_mc_down(struct inet6_dev *idev) |
diff --git a/net/ipv6/protocol.c b/net/ipv6/protocol.c index 568864f722ca..1fa3468f0f32 100644 --- a/net/ipv6/protocol.c +++ b/net/ipv6/protocol.c | |||
@@ -25,11 +25,11 @@ | |||
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <net/protocol.h> | 26 | #include <net/protocol.h> |
27 | 27 | ||
28 | struct inet6_protocol *inet6_protos[MAX_INET_PROTOS]; | 28 | const struct inet6_protocol *inet6_protos[MAX_INET_PROTOS]; |
29 | static DEFINE_SPINLOCK(inet6_proto_lock); | 29 | static DEFINE_SPINLOCK(inet6_proto_lock); |
30 | 30 | ||
31 | 31 | ||
32 | int inet6_add_protocol(struct inet6_protocol *prot, unsigned char protocol) | 32 | int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char protocol) |
33 | { | 33 | { |
34 | int ret, hash = protocol & (MAX_INET_PROTOS - 1); | 34 | int ret, hash = protocol & (MAX_INET_PROTOS - 1); |
35 | 35 | ||
@@ -53,7 +53,7 @@ EXPORT_SYMBOL(inet6_add_protocol); | |||
53 | * Remove a protocol from the hash tables. | 53 | * Remove a protocol from the hash tables. |
54 | */ | 54 | */ |
55 | 55 | ||
56 | int inet6_del_protocol(struct inet6_protocol *prot, unsigned char protocol) | 56 | int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char protocol) |
57 | { | 57 | { |
58 | int ret, hash = protocol & (MAX_INET_PROTOS - 1); | 58 | int ret, hash = protocol & (MAX_INET_PROTOS - 1); |
59 | 59 | ||
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 2642a41a8535..da5bd0ed83df 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -627,7 +627,7 @@ fail_hdr: | |||
627 | return -1; | 627 | return -1; |
628 | } | 628 | } |
629 | 629 | ||
630 | static struct inet6_protocol frag_protocol = | 630 | static const struct inet6_protocol frag_protocol = |
631 | { | 631 | { |
632 | .handler = ipv6_frag_rcv, | 632 | .handler = ipv6_frag_rcv, |
633 | .flags = INET6_PROTO_NOPOLICY, | 633 | .flags = INET6_PROTO_NOPOLICY, |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 9ccfef345560..77aecbe8ff6c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -481,7 +481,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len, | |||
481 | 481 | ||
482 | pref = rinfo->route_pref; | 482 | pref = rinfo->route_pref; |
483 | if (pref == ICMPV6_ROUTER_PREF_INVALID) | 483 | if (pref == ICMPV6_ROUTER_PREF_INVALID) |
484 | pref = ICMPV6_ROUTER_PREF_MEDIUM; | 484 | return -EINVAL; |
485 | 485 | ||
486 | lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ); | 486 | lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ); |
487 | 487 | ||
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 3aae0f217d61..21d100b68b19 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1846,7 +1846,7 @@ static int tcp_v6_init_sock(struct sock *sk) | |||
1846 | /* See draft-stevens-tcpca-spec-01 for discussion of the | 1846 | /* See draft-stevens-tcpca-spec-01 for discussion of the |
1847 | * initialization of these values. | 1847 | * initialization of these values. |
1848 | */ | 1848 | */ |
1849 | tp->snd_ssthresh = 0x7fffffff; | 1849 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; |
1850 | tp->snd_cwnd_clamp = ~0; | 1850 | tp->snd_cwnd_clamp = ~0; |
1851 | tp->mss_cache = 536; | 1851 | tp->mss_cache = 536; |
1852 | 1852 | ||
@@ -1969,7 +1969,8 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) | |||
1969 | jiffies_to_clock_t(icsk->icsk_rto), | 1969 | jiffies_to_clock_t(icsk->icsk_rto), |
1970 | jiffies_to_clock_t(icsk->icsk_ack.ato), | 1970 | jiffies_to_clock_t(icsk->icsk_ack.ato), |
1971 | (icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong, | 1971 | (icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong, |
1972 | tp->snd_cwnd, tp->snd_ssthresh>=0xFFFF?-1:tp->snd_ssthresh | 1972 | tp->snd_cwnd, |
1973 | tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh | ||
1973 | ); | 1974 | ); |
1974 | } | 1975 | } |
1975 | 1976 | ||
@@ -2093,7 +2094,7 @@ struct proto tcpv6_prot = { | |||
2093 | #endif | 2094 | #endif |
2094 | }; | 2095 | }; |
2095 | 2096 | ||
2096 | static struct inet6_protocol tcpv6_protocol = { | 2097 | static const struct inet6_protocol tcpv6_protocol = { |
2097 | .handler = tcp_v6_rcv, | 2098 | .handler = tcp_v6_rcv, |
2098 | .err_handler = tcp_v6_err, | 2099 | .err_handler = tcp_v6_err, |
2099 | .gso_send_check = tcp_v6_gso_send_check, | 2100 | .gso_send_check = tcp_v6_gso_send_check, |
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c index 633ad789effc..51e2832d13a6 100644 --- a/net/ipv6/tunnel6.c +++ b/net/ipv6/tunnel6.c | |||
@@ -133,13 +133,13 @@ static void tunnel6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
133 | break; | 133 | break; |
134 | } | 134 | } |
135 | 135 | ||
136 | static struct inet6_protocol tunnel6_protocol = { | 136 | static const struct inet6_protocol tunnel6_protocol = { |
137 | .handler = tunnel6_rcv, | 137 | .handler = tunnel6_rcv, |
138 | .err_handler = tunnel6_err, | 138 | .err_handler = tunnel6_err, |
139 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, | 139 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, |
140 | }; | 140 | }; |
141 | 141 | ||
142 | static struct inet6_protocol tunnel46_protocol = { | 142 | static const struct inet6_protocol tunnel46_protocol = { |
143 | .handler = tunnel46_rcv, | 143 | .handler = tunnel46_rcv, |
144 | .err_handler = tunnel6_err, | 144 | .err_handler = tunnel6_err, |
145 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, | 145 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 164040613c2e..b265b7047d3e 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -1172,7 +1172,7 @@ out: | |||
1172 | return segs; | 1172 | return segs; |
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | static struct inet6_protocol udpv6_protocol = { | 1175 | static const struct inet6_protocol udpv6_protocol = { |
1176 | .handler = udpv6_rcv, | 1176 | .handler = udpv6_rcv, |
1177 | .err_handler = udpv6_err, | 1177 | .err_handler = udpv6_err, |
1178 | .gso_send_check = udp6_ufo_send_check, | 1178 | .gso_send_check = udp6_ufo_send_check, |
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c index 4818c48688f2..d737a27ee010 100644 --- a/net/ipv6/udplite.c +++ b/net/ipv6/udplite.c | |||
@@ -25,7 +25,7 @@ static void udplitev6_err(struct sk_buff *skb, | |||
25 | __udp6_lib_err(skb, opt, type, code, offset, info, &udplite_table); | 25 | __udp6_lib_err(skb, opt, type, code, offset, info, &udplite_table); |
26 | } | 26 | } |
27 | 27 | ||
28 | static struct inet6_protocol udplitev6_protocol = { | 28 | static const struct inet6_protocol udplitev6_protocol = { |
29 | .handler = udplitev6_rcv, | 29 | .handler = udplitev6_rcv, |
30 | .err_handler = udplitev6_err, | 30 | .err_handler = udplitev6_err, |
31 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, | 31 | .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, |