aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r--net/ipv6/raw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 9db0de81f074..a082646e6f16 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -141,11 +141,12 @@ static __inline__ int icmpv6_filter(struct sock *sk, struct sk_buff *skb)
141 * 141 *
142 * Caller owns SKB so we must make clones. 142 * Caller owns SKB so we must make clones.
143 */ 143 */
144void ipv6_raw_deliver(struct sk_buff *skb, int nexthdr) 144int ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
145{ 145{
146 struct in6_addr *saddr; 146 struct in6_addr *saddr;
147 struct in6_addr *daddr; 147 struct in6_addr *daddr;
148 struct sock *sk; 148 struct sock *sk;
149 int delivered = 0;
149 __u8 hash; 150 __u8 hash;
150 151
151 saddr = &skb->nh.ipv6h->saddr; 152 saddr = &skb->nh.ipv6h->saddr;
@@ -167,6 +168,7 @@ void ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
167 sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, skb->dev->ifindex); 168 sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, skb->dev->ifindex);
168 169
169 while (sk) { 170 while (sk) {
171 delivered = 1;
170 if (nexthdr != IPPROTO_ICMPV6 || !icmpv6_filter(sk, skb)) { 172 if (nexthdr != IPPROTO_ICMPV6 || !icmpv6_filter(sk, skb)) {
171 struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC); 173 struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
172 174
@@ -179,6 +181,7 @@ void ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
179 } 181 }
180out: 182out:
181 read_unlock(&raw_v6_lock); 183 read_unlock(&raw_v6_lock);
184 return delivered;
182} 185}
183 186
184/* This cleans up af_inet6 a bit. -DaveM */ 187/* This cleans up af_inet6 a bit. -DaveM */