diff options
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index d1835b1bc8c4..e222c5c26b32 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -150,10 +150,11 @@ static __inline__ int icmp_filter(struct sock *sk, struct sk_buff *skb) | |||
150 | * RFC 1122: SHOULD pass TOS value up to the transport layer. | 150 | * RFC 1122: SHOULD pass TOS value up to the transport layer. |
151 | * -> It does. And not only TOS, but all IP header. | 151 | * -> It does. And not only TOS, but all IP header. |
152 | */ | 152 | */ |
153 | void raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash) | 153 | int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash) |
154 | { | 154 | { |
155 | struct sock *sk; | 155 | struct sock *sk; |
156 | struct hlist_head *head; | 156 | struct hlist_head *head; |
157 | int delivered = 0; | ||
157 | 158 | ||
158 | read_lock(&raw_v4_lock); | 159 | read_lock(&raw_v4_lock); |
159 | head = &raw_v4_htable[hash]; | 160 | head = &raw_v4_htable[hash]; |
@@ -164,6 +165,7 @@ void raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash) | |||
164 | skb->dev->ifindex); | 165 | skb->dev->ifindex); |
165 | 166 | ||
166 | while (sk) { | 167 | while (sk) { |
168 | delivered = 1; | ||
167 | if (iph->protocol != IPPROTO_ICMP || !icmp_filter(sk, skb)) { | 169 | if (iph->protocol != IPPROTO_ICMP || !icmp_filter(sk, skb)) { |
168 | struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC); | 170 | struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC); |
169 | 171 | ||
@@ -177,6 +179,7 @@ void raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash) | |||
177 | } | 179 | } |
178 | out: | 180 | out: |
179 | read_unlock(&raw_v4_lock); | 181 | read_unlock(&raw_v4_lock); |
182 | return delivered; | ||
180 | } | 183 | } |
181 | 184 | ||
182 | void raw_err (struct sock *sk, struct sk_buff *skb, u32 info) | 185 | void raw_err (struct sock *sk, struct sk_buff *skb, u32 info) |