aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_input.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-01-13 00:02:45 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-13 20:17:14 -0500
commitdd3332bfcb2223458f553f341d3388cb84040e6a (patch)
treed48ba8b295ee3d08c4b4b4f8d924038ccec2c5eb /net/ipv6/ip6_input.c
parent2b464f61f036f7fb9cbc34710c9b2390499e87d0 (diff)
ipv6: Store Router Alert option in IP6CB directly.
Router Alert option is very small and we can store the value itself in the skb. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_input.c')
-rw-r--r--net/ipv6/ip6_input.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 2ccd35ec3628..4ac5bf30e16a 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -280,9 +280,8 @@ int ip6_mc_input(struct sk_buff *skb)
280 struct inet6_skb_parm *opt = IP6CB(skb); 280 struct inet6_skb_parm *opt = IP6CB(skb);
281 281
282 /* Check for MLD */ 282 /* Check for MLD */
283 if (unlikely(opt->ra)) { 283 if (unlikely(opt->flags & IP6SKB_ROUTERALERT)) {
284 /* Check if this is a mld message */ 284 /* Check if this is a mld message */
285 u8 *ptr = skb_network_header(skb) + opt->ra;
286 u8 nexthdr = hdr->nexthdr; 285 u8 nexthdr = hdr->nexthdr;
287 __be16 frag_off; 286 __be16 frag_off;
288 int offset; 287 int offset;
@@ -290,7 +289,7 @@ int ip6_mc_input(struct sk_buff *skb)
290 /* Check if the value of Router Alert 289 /* Check if the value of Router Alert
291 * is for MLD (0x0000). 290 * is for MLD (0x0000).
292 */ 291 */
293 if ((ptr[2] | ptr[3]) == 0) { 292 if (opt->ra == htons(IPV6_OPT_ROUTERALERT_MLD)) {
294 deliver = false; 293 deliver = false;
295 294
296 if (!ipv6_ext_hdr(nexthdr)) { 295 if (!ipv6_ext_hdr(nexthdr)) {