mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-11 17:34:57 +00:00
fix a kernel bug where IPv6 packets are received on IPv4 sockets, this fixes dual stack software like OLSRd when running on Kernel 2.4 Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
SVN-Revision: 21461
This commit is contained in:
parent
52f1e9e50f
commit
f155da0922
@ -0,0 +1,18 @@
|
||||
--- a/net/ipv4/udp.c 2009-12-26 00:06:59.000000000 +0100
|
||||
+++ b/net/ipv4/udp.c 2009-12-27 00:27:05.003012266 +0100
|
||||
@@ -711,7 +711,14 @@
|
||||
skb = skb_recv_datagram(sk, flags, noblock, &err);
|
||||
if (!skb)
|
||||
goto out;
|
||||
-
|
||||
+
|
||||
+ if (skb->nh.iph->version != 4) {
|
||||
+ skb_free_datagram(sk, skb);
|
||||
+ if (noblock)
|
||||
+ return -EAGAIN;
|
||||
+ goto try_again;
|
||||
+ }
|
||||
+
|
||||
copied = skb->len - sizeof(struct udphdr);
|
||||
if (copied > len) {
|
||||
copied = len;
|
Loading…
Reference in New Issue
Block a user