diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-07-18 06:19:57 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-07-18 06:20:01 -0400 |
| commit | 45bceffc3013bda7d2ebc7802e9b153b674e2d44 (patch) | |
| tree | 222d7dd8fd300925cbf12cdc0fba5bee2528997e /net/ipv6 | |
| parent | 6f2f3cf00ee32f75ba007a46bab88a54d68a5deb (diff) | |
| parent | 78af08d90b8f745044b1274430bc4bc6b2b27aca (diff) | |
Merge branch 'linus' into tracing/core
Merge reason: tracing/core was on an older, pre-rc1 base.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/ipv6')
| -rw-r--r-- | net/ipv6/addrconf.c | 35 | ||||
| -rw-r--r-- | net/ipv6/af_inet6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/ah6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/esp6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/icmp.c | 12 | ||||
| -rw-r--r-- | net/ipv6/ip6_input.c | 3 | ||||
| -rw-r--r-- | net/ipv6/ip6_output.c | 1 | ||||
| -rw-r--r-- | net/ipv6/ip6_tunnel.c | 18 | ||||
| -rw-r--r-- | net/ipv6/ipcomp6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/mip6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/raw.c | 4 | ||||
| -rw-r--r-- | net/ipv6/route.c | 2 | ||||
| -rw-r--r-- | net/ipv6/sit.c | 1 | ||||
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/tunnel6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/udp.c | 6 | ||||
| -rw-r--r-- | net/ipv6/udp_impl.h | 2 | ||||
| -rw-r--r-- | net/ipv6/udplite.c | 2 | ||||
| -rw-r--r-- | net/ipv6/xfrm6_policy.c | 6 | ||||
| -rw-r--r-- | net/ipv6/xfrm6_tunnel.c | 2 |
20 files changed, 71 insertions, 37 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 8c1e86afbbf5..43b3c9f89c12 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -1916,8 +1916,32 @@ ok: | |||
| 1916 | update_lft = 1; | 1916 | update_lft = 1; |
| 1917 | else if (stored_lft <= MIN_VALID_LIFETIME) { | 1917 | else if (stored_lft <= MIN_VALID_LIFETIME) { |
| 1918 | /* valid_lft <= stored_lft is always true */ | 1918 | /* valid_lft <= stored_lft is always true */ |
| 1919 | /* XXX: IPsec */ | 1919 | /* |
| 1920 | update_lft = 0; | 1920 | * RFC 4862 Section 5.5.3e: |
| 1921 | * "Note that the preferred lifetime of | ||
| 1922 | * the corresponding address is always | ||
| 1923 | * reset to the Preferred Lifetime in | ||
| 1924 | * the received Prefix Information | ||
| 1925 | * option, regardless of whether the | ||
| 1926 | * valid lifetime is also reset or | ||
| 1927 | * ignored." | ||
| 1928 | * | ||
| 1929 | * So if the preferred lifetime in | ||
| 1930 | * this advertisement is different | ||
| 1931 | * than what we have stored, but the | ||
| 1932 | * valid lifetime is invalid, just | ||
| 1933 | * reset prefered_lft. | ||
| 1934 | * | ||
| 1935 | * We must set the valid lifetime | ||
| 1936 | * to the stored lifetime since we'll | ||
| 1937 | * be updating the timestamp below, | ||
| 1938 | * else we'll set it back to the | ||
| 1939 | * minumum. | ||
| 1940 | */ | ||
| 1941 | if (prefered_lft != ifp->prefered_lft) { | ||
| 1942 | valid_lft = stored_lft; | ||
| 1943 | update_lft = 1; | ||
| 1944 | } | ||
| 1921 | } else { | 1945 | } else { |
| 1922 | valid_lft = MIN_VALID_LIFETIME; | 1946 | valid_lft = MIN_VALID_LIFETIME; |
| 1923 | if (valid_lft < prefered_lft) | 1947 | if (valid_lft < prefered_lft) |
| @@ -3085,7 +3109,7 @@ restart: | |||
| 3085 | spin_unlock(&ifp->lock); | 3109 | spin_unlock(&ifp->lock); |
| 3086 | continue; | 3110 | continue; |
| 3087 | } else if (age >= ifp->prefered_lft) { | 3111 | } else if (age >= ifp->prefered_lft) { |
| 3088 | /* jiffies - ifp->tsamp > age >= ifp->prefered_lft */ | 3112 | /* jiffies - ifp->tstamp > age >= ifp->prefered_lft */ |
| 3089 | int deprecate = 0; | 3113 | int deprecate = 0; |
| 3090 | 3114 | ||
| 3091 | if (!(ifp->flags&IFA_F_DEPRECATED)) { | 3115 | if (!(ifp->flags&IFA_F_DEPRECATED)) { |
| @@ -3362,7 +3386,10 @@ static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa, | |||
| 3362 | valid = ifa->valid_lft; | 3386 | valid = ifa->valid_lft; |
| 3363 | if (preferred != INFINITY_LIFE_TIME) { | 3387 | if (preferred != INFINITY_LIFE_TIME) { |
| 3364 | long tval = (jiffies - ifa->tstamp)/HZ; | 3388 | long tval = (jiffies - ifa->tstamp)/HZ; |
| 3365 | preferred -= tval; | 3389 | if (preferred > tval) |
| 3390 | preferred -= tval; | ||
| 3391 | else | ||
| 3392 | preferred = 0; | ||
| 3366 | if (valid != INFINITY_LIFE_TIME) | 3393 | if (valid != INFINITY_LIFE_TIME) |
| 3367 | valid -= tval; | 3394 | valid -= tval; |
| 3368 | } | 3395 | } |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 85b3d0036afd..caa0278d30a9 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
| @@ -1284,6 +1284,8 @@ static void __exit inet6_exit(void) | |||
| 1284 | proto_unregister(&udplitev6_prot); | 1284 | proto_unregister(&udplitev6_prot); |
| 1285 | proto_unregister(&udpv6_prot); | 1285 | proto_unregister(&udpv6_prot); |
| 1286 | proto_unregister(&tcpv6_prot); | 1286 | proto_unregister(&tcpv6_prot); |
| 1287 | |||
| 1288 | rcu_barrier(); /* Wait for completion of call_rcu()'s */ | ||
| 1287 | } | 1289 | } |
| 1288 | module_exit(inet6_exit); | 1290 | module_exit(inet6_exit); |
| 1289 | 1291 | ||
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 52449f7a1b71..86f42a288c4b 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
| @@ -405,7 +405,7 @@ out: | |||
| 405 | } | 405 | } |
| 406 | 406 | ||
| 407 | static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 407 | static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 408 | int type, int code, int offset, __be32 info) | 408 | u8 type, u8 code, int offset, __be32 info) |
| 409 | { | 409 | { |
| 410 | struct net *net = dev_net(skb->dev); | 410 | struct net *net = dev_net(skb->dev); |
| 411 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; | 411 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; |
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index c2f250150db1..678bb95b1525 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c | |||
| @@ -354,7 +354,7 @@ static u32 esp6_get_mtu(struct xfrm_state *x, int mtu) | |||
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 356 | static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 357 | int type, int code, int offset, __be32 info) | 357 | u8 type, u8 code, int offset, __be32 info) |
| 358 | { | 358 | { |
| 359 | struct net *net = dev_net(skb->dev); | 359 | struct net *net = dev_net(skb->dev); |
| 360 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; | 360 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 36dff8807183..eab62a7a8f06 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
| @@ -117,7 +117,7 @@ static __inline__ void icmpv6_xmit_unlock(struct sock *sk) | |||
| 117 | /* | 117 | /* |
| 118 | * Slightly more convenient version of icmpv6_send. | 118 | * Slightly more convenient version of icmpv6_send. |
| 119 | */ | 119 | */ |
| 120 | void icmpv6_param_prob(struct sk_buff *skb, int code, int pos) | 120 | void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos) |
| 121 | { | 121 | { |
| 122 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); | 122 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); |
| 123 | kfree_skb(skb); | 123 | kfree_skb(skb); |
| @@ -161,7 +161,7 @@ static int is_ineligible(struct sk_buff *skb) | |||
| 161 | /* | 161 | /* |
| 162 | * Check the ICMP output rate limit | 162 | * Check the ICMP output rate limit |
| 163 | */ | 163 | */ |
| 164 | static inline int icmpv6_xrlim_allow(struct sock *sk, int type, | 164 | static inline int icmpv6_xrlim_allow(struct sock *sk, u8 type, |
| 165 | struct flowi *fl) | 165 | struct flowi *fl) |
| 166 | { | 166 | { |
| 167 | struct dst_entry *dst; | 167 | struct dst_entry *dst; |
| @@ -305,7 +305,7 @@ static inline void mip6_addr_swap(struct sk_buff *skb) {} | |||
| 305 | /* | 305 | /* |
| 306 | * Send an ICMP message in response to a packet in error | 306 | * Send an ICMP message in response to a packet in error |
| 307 | */ | 307 | */ |
| 308 | void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | 308 | void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, |
| 309 | struct net_device *dev) | 309 | struct net_device *dev) |
| 310 | { | 310 | { |
| 311 | struct net *net = dev_net(skb->dev); | 311 | struct net *net = dev_net(skb->dev); |
| @@ -590,7 +590,7 @@ out: | |||
| 590 | icmpv6_xmit_unlock(sk); | 590 | icmpv6_xmit_unlock(sk); |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | static void icmpv6_notify(struct sk_buff *skb, int type, int code, __be32 info) | 593 | static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info) |
| 594 | { | 594 | { |
| 595 | struct inet6_protocol *ipprot; | 595 | struct inet6_protocol *ipprot; |
| 596 | int inner_offset; | 596 | int inner_offset; |
| @@ -643,7 +643,7 @@ static int icmpv6_rcv(struct sk_buff *skb) | |||
| 643 | struct in6_addr *saddr, *daddr; | 643 | struct in6_addr *saddr, *daddr; |
| 644 | struct ipv6hdr *orig_hdr; | 644 | struct ipv6hdr *orig_hdr; |
| 645 | struct icmp6hdr *hdr; | 645 | struct icmp6hdr *hdr; |
| 646 | int type; | 646 | u8 type; |
| 647 | 647 | ||
| 648 | if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 648 | if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
| 649 | struct sec_path *sp = skb_sec_path(skb); | 649 | struct sec_path *sp = skb_sec_path(skb); |
| @@ -914,7 +914,7 @@ static const struct icmp6_err { | |||
| 914 | }, | 914 | }, |
| 915 | }; | 915 | }; |
| 916 | 916 | ||
| 917 | int icmpv6_err_convert(int type, int code, int *err) | 917 | int icmpv6_err_convert(u8 type, u8 code, int *err) |
| 918 | { | 918 | { |
| 919 | int fatal = 0; | 919 | int fatal = 0; |
| 920 | 920 | ||
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index c3a07d75b5f5..6d6a4277c677 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
| @@ -139,6 +139,9 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
| 139 | 139 | ||
| 140 | rcu_read_unlock(); | 140 | rcu_read_unlock(); |
| 141 | 141 | ||
| 142 | /* Must drop socket now because of tproxy. */ | ||
| 143 | skb_orphan(skb); | ||
| 144 | |||
| 142 | return NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, dev, NULL, | 145 | return NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, dev, NULL, |
| 143 | ip6_rcv_finish); | 146 | ip6_rcv_finish); |
| 144 | err: | 147 | err: |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 7c76e3d18215..87f8419a68fd 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
| @@ -1484,7 +1484,6 @@ int ip6_push_pending_frames(struct sock *sk) | |||
| 1484 | skb->len += tmp_skb->len; | 1484 | skb->len += tmp_skb->len; |
| 1485 | skb->data_len += tmp_skb->len; | 1485 | skb->data_len += tmp_skb->len; |
| 1486 | skb->truesize += tmp_skb->truesize; | 1486 | skb->truesize += tmp_skb->truesize; |
| 1487 | __sock_put(tmp_skb->sk); | ||
| 1488 | tmp_skb->destructor = NULL; | 1487 | tmp_skb->destructor = NULL; |
| 1489 | tmp_skb->sk = NULL; | 1488 | tmp_skb->sk = NULL; |
| 1490 | } | 1489 | } |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 404d16a97d5c..51f410e7775a 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
| @@ -394,13 +394,13 @@ parse_tlv_tnl_enc_lim(struct sk_buff *skb, __u8 * raw) | |||
| 394 | 394 | ||
| 395 | static int | 395 | static int |
| 396 | ip6_tnl_err(struct sk_buff *skb, __u8 ipproto, struct inet6_skb_parm *opt, | 396 | ip6_tnl_err(struct sk_buff *skb, __u8 ipproto, struct inet6_skb_parm *opt, |
| 397 | int *type, int *code, int *msg, __u32 *info, int offset) | 397 | u8 *type, u8 *code, int *msg, __u32 *info, int offset) |
| 398 | { | 398 | { |
| 399 | struct ipv6hdr *ipv6h = (struct ipv6hdr *) skb->data; | 399 | struct ipv6hdr *ipv6h = (struct ipv6hdr *) skb->data; |
| 400 | struct ip6_tnl *t; | 400 | struct ip6_tnl *t; |
| 401 | int rel_msg = 0; | 401 | int rel_msg = 0; |
| 402 | int rel_type = ICMPV6_DEST_UNREACH; | 402 | u8 rel_type = ICMPV6_DEST_UNREACH; |
| 403 | int rel_code = ICMPV6_ADDR_UNREACH; | 403 | u8 rel_code = ICMPV6_ADDR_UNREACH; |
| 404 | __u32 rel_info = 0; | 404 | __u32 rel_info = 0; |
| 405 | __u16 len; | 405 | __u16 len; |
| 406 | int err = -ENOENT; | 406 | int err = -ENOENT; |
| @@ -488,11 +488,11 @@ out: | |||
| 488 | 488 | ||
| 489 | static int | 489 | static int |
| 490 | ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 490 | ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 491 | int type, int code, int offset, __be32 info) | 491 | u8 type, u8 code, int offset, __be32 info) |
| 492 | { | 492 | { |
| 493 | int rel_msg = 0; | 493 | int rel_msg = 0; |
| 494 | int rel_type = type; | 494 | u8 rel_type = type; |
| 495 | int rel_code = code; | 495 | u8 rel_code = code; |
| 496 | __u32 rel_info = ntohl(info); | 496 | __u32 rel_info = ntohl(info); |
| 497 | int err; | 497 | int err; |
| 498 | struct sk_buff *skb2; | 498 | struct sk_buff *skb2; |
| @@ -586,11 +586,11 @@ out: | |||
| 586 | 586 | ||
| 587 | static int | 587 | static int |
| 588 | ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 588 | ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 589 | int type, int code, int offset, __be32 info) | 589 | u8 type, u8 code, int offset, __be32 info) |
| 590 | { | 590 | { |
| 591 | int rel_msg = 0; | 591 | int rel_msg = 0; |
| 592 | int rel_type = type; | 592 | u8 rel_type = type; |
| 593 | int rel_code = code; | 593 | u8 rel_code = code; |
| 594 | __u32 rel_info = ntohl(info); | 594 | __u32 rel_info = ntohl(info); |
| 595 | int err; | 595 | int err; |
| 596 | 596 | ||
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 3a0b3be7ece5..79c172f1ff01 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | #include <linux/mutex.h> | 51 | #include <linux/mutex.h> |
| 52 | 52 | ||
| 53 | static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 53 | static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 54 | int type, int code, int offset, __be32 info) | 54 | u8 type, u8 code, int offset, __be32 info) |
| 55 | { | 55 | { |
| 56 | __be32 spi; | 56 | __be32 spi; |
| 57 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; | 57 | struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; |
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c index f995e19c87a9..f797e8c6f3b3 100644 --- a/net/ipv6/mip6.c +++ b/net/ipv6/mip6.c | |||
| @@ -54,7 +54,7 @@ static inline void *mip6_padn(__u8 *data, __u8 padlen) | |||
| 54 | return data + padlen; | 54 | return data + padlen; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | static inline void mip6_param_prob(struct sk_buff *skb, int code, int pos) | 57 | static inline void mip6_param_prob(struct sk_buff *skb, u8 code, int pos) |
| 58 | { | 58 | { |
| 59 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); | 59 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); |
| 60 | } | 60 | } |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 8b0b6f948063..d6c3c1c34b2d 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
| @@ -310,7 +310,7 @@ out: | |||
| 310 | 310 | ||
| 311 | static void rawv6_err(struct sock *sk, struct sk_buff *skb, | 311 | static void rawv6_err(struct sock *sk, struct sk_buff *skb, |
| 312 | struct inet6_skb_parm *opt, | 312 | struct inet6_skb_parm *opt, |
| 313 | int type, int code, int offset, __be32 info) | 313 | u8 type, u8 code, int offset, __be32 info) |
| 314 | { | 314 | { |
| 315 | struct inet_sock *inet = inet_sk(sk); | 315 | struct inet_sock *inet = inet_sk(sk); |
| 316 | struct ipv6_pinfo *np = inet6_sk(sk); | 316 | struct ipv6_pinfo *np = inet6_sk(sk); |
| @@ -343,7 +343,7 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb, | |||
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | void raw6_icmp_error(struct sk_buff *skb, int nexthdr, | 345 | void raw6_icmp_error(struct sk_buff *skb, int nexthdr, |
| 346 | int type, int code, int inner_offset, __be32 info) | 346 | u8 type, u8 code, int inner_offset, __be32 info) |
| 347 | { | 347 | { |
| 348 | struct sock *sk; | 348 | struct sock *sk; |
| 349 | int hash; | 349 | int hash; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 658293ea05ba..1473ee0a1f51 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -1865,7 +1865,7 @@ int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg) | |||
| 1865 | * Drop the packet on the floor | 1865 | * Drop the packet on the floor |
| 1866 | */ | 1866 | */ |
| 1867 | 1867 | ||
| 1868 | static int ip6_pkt_drop(struct sk_buff *skb, int code, int ipstats_mib_noroutes) | 1868 | static int ip6_pkt_drop(struct sk_buff *skb, u8 code, int ipstats_mib_noroutes) |
| 1869 | { | 1869 | { |
| 1870 | int type; | 1870 | int type; |
| 1871 | struct dst_entry *dst = skb_dst(skb); | 1871 | struct dst_entry *dst = skb_dst(skb); |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 68e52308e552..98b7327d0949 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
| @@ -1018,6 +1018,7 @@ static void ipip6_tunnel_setup(struct net_device *dev) | |||
| 1018 | dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); | 1018 | dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); |
| 1019 | dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); | 1019 | dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); |
| 1020 | dev->flags = IFF_NOARP; | 1020 | dev->flags = IFF_NOARP; |
| 1021 | dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; | ||
| 1021 | dev->iflink = 0; | 1022 | dev->iflink = 0; |
| 1022 | dev->addr_len = 4; | 1023 | dev->addr_len = 4; |
| 1023 | dev->features |= NETIF_F_NETNS_LOCAL; | 1024 | dev->features |= NETIF_F_NETNS_LOCAL; |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 53b6a4192b16..58810c65b635 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -317,7 +317,7 @@ failure: | |||
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 319 | static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 320 | int type, int code, int offset, __be32 info) | 320 | u8 type, u8 code, int offset, __be32 info) |
| 321 | { | 321 | { |
| 322 | struct ipv6hdr *hdr = (struct ipv6hdr*)skb->data; | 322 | struct ipv6hdr *hdr = (struct ipv6hdr*)skb->data; |
| 323 | const struct tcphdr *th = (struct tcphdr *)(skb->data+offset); | 323 | const struct tcphdr *th = (struct tcphdr *)(skb->data+offset); |
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c index 669f280989c3..633ad789effc 100644 --- a/net/ipv6/tunnel6.c +++ b/net/ipv6/tunnel6.c | |||
| @@ -124,7 +124,7 @@ drop: | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | static void tunnel6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 126 | static void tunnel6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 127 | int type, int code, int offset, __be32 info) | 127 | u8 type, u8 code, int offset, __be32 info) |
| 128 | { | 128 | { |
| 129 | struct xfrm6_tunnel *handler; | 129 | struct xfrm6_tunnel *handler; |
| 130 | 130 | ||
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 023beda6b224..33b59bd92c4d 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
| @@ -312,7 +312,7 @@ csum_copy_err: | |||
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 314 | void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 315 | int type, int code, int offset, __be32 info, | 315 | u8 type, u8 code, int offset, __be32 info, |
| 316 | struct udp_table *udptable) | 316 | struct udp_table *udptable) |
| 317 | { | 317 | { |
| 318 | struct ipv6_pinfo *np; | 318 | struct ipv6_pinfo *np; |
| @@ -346,8 +346,8 @@ out: | |||
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | static __inline__ void udpv6_err(struct sk_buff *skb, | 348 | static __inline__ void udpv6_err(struct sk_buff *skb, |
| 349 | struct inet6_skb_parm *opt, int type, | 349 | struct inet6_skb_parm *opt, u8 type, |
| 350 | int code, int offset, __be32 info ) | 350 | u8 code, int offset, __be32 info ) |
| 351 | { | 351 | { |
| 352 | __udp6_lib_err(skb, opt, type, code, offset, info, &udp_table); | 352 | __udp6_lib_err(skb, opt, type, code, offset, info, &udp_table); |
| 353 | } | 353 | } |
diff --git a/net/ipv6/udp_impl.h b/net/ipv6/udp_impl.h index 23779208c334..6bb303471e20 100644 --- a/net/ipv6/udp_impl.h +++ b/net/ipv6/udp_impl.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | extern int __udp6_lib_rcv(struct sk_buff *, struct udp_table *, int ); | 10 | extern int __udp6_lib_rcv(struct sk_buff *, struct udp_table *, int ); |
| 11 | extern void __udp6_lib_err(struct sk_buff *, struct inet6_skb_parm *, | 11 | extern void __udp6_lib_err(struct sk_buff *, struct inet6_skb_parm *, |
| 12 | int , int , int , __be32 , struct udp_table *); | 12 | u8 , u8 , int , __be32 , struct udp_table *); |
| 13 | 13 | ||
| 14 | extern int udp_v6_get_port(struct sock *sk, unsigned short snum); | 14 | extern int udp_v6_get_port(struct sock *sk, unsigned short snum); |
| 15 | 15 | ||
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c index ba162a824585..4818c48688f2 100644 --- a/net/ipv6/udplite.c +++ b/net/ipv6/udplite.c | |||
| @@ -20,7 +20,7 @@ static int udplitev6_rcv(struct sk_buff *skb) | |||
| 20 | 20 | ||
| 21 | static void udplitev6_err(struct sk_buff *skb, | 21 | static void udplitev6_err(struct sk_buff *skb, |
| 22 | struct inet6_skb_parm *opt, | 22 | struct inet6_skb_parm *opt, |
| 23 | int type, int code, int offset, __be32 info) | 23 | u8 type, u8 code, int offset, __be32 info) |
| 24 | { | 24 | { |
| 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 | } |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index b4b16a43f277..3a3c677bc0f2 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
| @@ -157,7 +157,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
| 157 | ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr); | 157 | ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr); |
| 158 | ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr); | 158 | ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr); |
| 159 | 159 | ||
| 160 | while (pskb_may_pull(skb, nh + offset + 1 - skb->data)) { | 160 | while (nh + offset + 1 < skb->data || |
| 161 | pskb_may_pull(skb, nh + offset + 1 - skb->data)) { | ||
| 161 | nh = skb_network_header(skb); | 162 | nh = skb_network_header(skb); |
| 162 | exthdr = (struct ipv6_opt_hdr *)(nh + offset); | 163 | exthdr = (struct ipv6_opt_hdr *)(nh + offset); |
| 163 | 164 | ||
| @@ -177,7 +178,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
| 177 | case IPPROTO_TCP: | 178 | case IPPROTO_TCP: |
| 178 | case IPPROTO_SCTP: | 179 | case IPPROTO_SCTP: |
| 179 | case IPPROTO_DCCP: | 180 | case IPPROTO_DCCP: |
| 180 | if (!onlyproto && pskb_may_pull(skb, nh + offset + 4 - skb->data)) { | 181 | if (!onlyproto && (nh + offset + 4 < skb->data || |
| 182 | pskb_may_pull(skb, nh + offset + 4 - skb->data))) { | ||
| 181 | __be16 *ports = (__be16 *)exthdr; | 183 | __be16 *ports = (__be16 *)exthdr; |
| 182 | 184 | ||
| 183 | fl->fl_ip_sport = ports[!!reverse]; | 185 | fl->fl_ip_sport = ports[!!reverse]; |
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index 80193db224d9..81a95c00e503 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c | |||
| @@ -262,7 +262,7 @@ static int xfrm6_tunnel_rcv(struct sk_buff *skb) | |||
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | 264 | static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
| 265 | int type, int code, int offset, __be32 info) | 265 | u8 type, u8 code, int offset, __be32 info) |
| 266 | { | 266 | { |
| 267 | /* xfrm6_tunnel native err handling */ | 267 | /* xfrm6_tunnel native err handling */ |
| 268 | switch (type) { | 268 | switch (type) { |
