diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-15 22:36:56 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-15 22:36:56 +0000 |
commit | f155da0922f3cf4b2170f92e1fd93052b322f927 (patch) | |
tree | 52c4f62aa207d30ed04ca728d3a36c136dd1fb34 /target/linux | |
parent | 52f1e9e50f7b3be78c1c1013b9432e820998c9d4 (diff) | |
download | mtk-20170518-f155da0922f3cf4b2170f92e1fd93052b322f927.zip mtk-20170518-f155da0922f3cf4b2170f92e1fd93052b322f927.tar.gz mtk-20170518-f155da0922f3cf4b2170f92e1fd93052b322f927.tar.bz2 |
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
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/brcm-2.4/patches/200-fix_ipv6_receiving_with_ipv4_socket.patch | 18 |
1 files changed, 18 insertions, 0 deletions
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 0000000..8d836c2 --- /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; |