From: Jo-Philipp Wich Date: Sat, 15 May 2010 22:36:56 +0000 (+0000) Subject: [brcm-2.4] fix a kernel bug where IPv6 packets are received on IPv4 sockets, this... X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=b1a0e919c37045abe4c248643da833133e90d806;hp=3645576bd4c2ef0e2379a8a2d0637dba3d7cc342 [brcm-2.4] 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 SVN-Revision: 21461 --- diff --git a/target/linux/brcm-2.4/patches/200-fix_ipv6_receiving_with_ipv4_socket.patch b/target/linux/brcm-2.4/patches/200-fix_ipv6_receiving_with_ipv4_socket.patch new file mode 100644 index 0000000000..8d836c2ec5 --- /dev/null +++ b/target/linux/brcm-2.4/patches/200-fix_ipv6_receiving_with_ipv4_socket.patch @@ -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;