Contents of /trunk/kernel26-alx/patches-2.6.20-r6/0119-2.6.20.19-all-fixes.patch
Parent Directory | Revision Log
Revision 1175 -
(show annotations)
(download)
Thu Oct 14 12:15:46 2010 UTC (13 years, 11 months ago) by niro
File size: 1742 byte(s)
Thu Oct 14 12:15:46 2010 UTC (13 years, 11 months ago) by niro
File size: 1742 byte(s)
-2.6.20-alx-r6 new magellan 0.5.2 kernel
1 | diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c |
2 | index de96e1a..82a3444 100644 |
3 | --- a/net/ipv6/exthdrs.c |
4 | +++ b/net/ipv6/exthdrs.c |
5 | @@ -653,6 +653,14 @@ EXPORT_SYMBOL_GPL(ipv6_invert_rthdr); |
6 | Hop-by-hop options. |
7 | **********************************/ |
8 | |
9 | +/* |
10 | + * Note: we cannot rely on skb->dst before we assign it in ip6_route_input(). |
11 | + */ |
12 | +static inline struct inet6_dev *ipv6_skb_idev(struct sk_buff *skb) |
13 | +{ |
14 | + return skb->dst ? ip6_dst_idev(skb->dst) : __in6_dev_get(skb->dev); |
15 | +} |
16 | + |
17 | /* Router Alert as of RFC 2711 */ |
18 | |
19 | static int ipv6_hop_ra(struct sk_buff **skbp, int optoff) |
20 | @@ -679,25 +687,25 @@ static int ipv6_hop_jumbo(struct sk_buff **skbp, int optoff) |
21 | if (skb->nh.raw[optoff+1] != 4 || (optoff&3) != 2) { |
22 | LIMIT_NETDEBUG(KERN_DEBUG "ipv6_hop_jumbo: wrong jumbo opt length/alignment %d\n", |
23 | skb->nh.raw[optoff+1]); |
24 | - IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), |
25 | + IP6_INC_STATS_BH(ipv6_skb_idev(skb), |
26 | IPSTATS_MIB_INHDRERRORS); |
27 | goto drop; |
28 | } |
29 | |
30 | pkt_len = ntohl(*(__be32*)(skb->nh.raw+optoff+2)); |
31 | if (pkt_len <= IPV6_MAXPLEN) { |
32 | - IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INHDRERRORS); |
33 | + IP6_INC_STATS_BH(ipv6_skb_idev(skb), IPSTATS_MIB_INHDRERRORS); |
34 | icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff+2); |
35 | return 0; |
36 | } |
37 | if (skb->nh.ipv6h->payload_len) { |
38 | - IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INHDRERRORS); |
39 | + IP6_INC_STATS_BH(ipv6_skb_idev(skb), IPSTATS_MIB_INHDRERRORS); |
40 | icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff); |
41 | return 0; |
42 | } |
43 | |
44 | if (pkt_len > skb->len - sizeof(struct ipv6hdr)) { |
45 | - IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INTRUNCATEDPKTS); |
46 | + IP6_INC_STATS_BH(ipv6_skb_idev(skb), IPSTATS_MIB_INTRUNCATEDPKTS); |
47 | goto drop; |
48 | } |
49 |