summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6_input.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-04-10 15:41:26 +0900
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-04-11 19:47:49 +0900
commitaba6096b21e151bc55da74605fe77b92cfcccb12 (patch)
tree420797fd939fff324c65913c3dc9f10deff5ff73 /net/ipv6/ip6_input.c
parentc0b8c32b1c96afc9b32b717927330025cc1c501e (diff)
[IPV6]: Kill several warnings without CONFIG_IPV6_MROUTE.
Pointed out by Andrew Morton <akpm@linux-foundation.org>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/ip6_input.c')
-rw-r--r--net/ipv6/ip6_input.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 09a3201e408a..4e5c8615832c 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -262,21 +262,23 @@ int ip6_mc_input(struct sk_buff *skb)
* is for MLD (0x0000).
*/
if ((ptr[2] | ptr[3]) == 0) {
+ deliver = 0;
+
if (!ipv6_ext_hdr(nexthdr)) {
/* BUG */
- goto discard;
+ goto out;
}
offset = ipv6_skip_exthdr(skb, sizeof(*hdr),
&nexthdr);
if (offset < 0)
- goto discard;
+ goto out;
if (nexthdr != IPPROTO_ICMPV6)
- goto discard;
+ goto out;
if (!pskb_may_pull(skb, (skb_network_header(skb) +
offset + 1 - skb->data)))
- goto discard;
+ goto out;
icmp6 = (struct icmp6hdr *)(skb_network_header(skb) + offset);
@@ -285,12 +287,9 @@ int ip6_mc_input(struct sk_buff *skb)
case ICMPV6_MGM_REPORT:
case ICMPV6_MGM_REDUCTION:
case ICMPV6_MLD2_REPORT:
+ deliver = 1;
break;
- default:
- /* Bogus */
- goto discard;
}
- deliver = 1;
goto out;
}
/* unknown RA - process it normally */
@@ -308,15 +307,14 @@ int ip6_mc_input(struct sk_buff *skb)
ip6_mr_input(skb2);
}
}
-#endif
out:
- if (likely(deliver)) {
+#endif
+ if (likely(deliver))
ip6_input(skb);
- return 0;
+ else {
+ /* discard */
+ kfree_skb(skb);
}
-discard:
- /* discard */
- kfree_skb(skb);
return 0;
}