diff options
author | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> | 2013-06-21 22:13:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-25 17:47:22 -0400 |
commit | ab4eb3537e3f20b2a88467e1f708a136df6e0ecb (patch) | |
tree | 8628924f196b022395f241acec9eab9ae946b55f /net/ipv6 | |
parent | a3d9dd89b781bdcb14201847608b658442de812b (diff) |
ipv6: Process unicast packet with Router Alert by checking flag in skb.
Router Alert option is marked in skb.
Previously, IP6CB(skb)->ra was set to positive value for such packets.
Since commit dd3332bf ("ipv6: Store Router Alert option in IP6CB
directly."), IP6SKB_ROUTERALERT is set in IP6CB(skb)->flags, and
the value of Router Alert option (in network byte order) is set
to IP6CB(skb)->ra for such packets.
Multicast forwarding path uses that flag and value, but unicast
forwarding path does not use the flag and misuses IP6CB(skb)->ra
value.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_output.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index dae1949019d7..95703ba2c084 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -381,9 +381,8 @@ int ip6_forward(struct sk_buff *skb) | |||
381 | * cannot be fragmented, because there is no warranty | 381 | * cannot be fragmented, because there is no warranty |
382 | * that different fragments will go along one path. --ANK | 382 | * that different fragments will go along one path. --ANK |
383 | */ | 383 | */ |
384 | if (opt->ra) { | 384 | if (unlikely(opt->flags & IP6SKB_ROUTERALERT)) { |
385 | u8 *ptr = skb_network_header(skb) + opt->ra; | 385 | if (ip6_call_ra_chain(skb, ntohs(opt->ra))) |
386 | if (ip6_call_ra_chain(skb, (ptr[2]<<8) + ptr[3])) | ||
387 | return 0; | 386 | return 0; |
388 | } | 387 | } |
389 | 388 | ||