udp: fix for unicast RX path optimization
Subsystems (3)
PATCH 1/1 udp: fix for unicast RX path optimization
Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and
5051ebd275de672b807c28d93002c2fb0514a3c9 ("ipv[46]: udp: optimize unicast RX path") broke some programs.
After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an
down, after the 10th tunnel came up. My modified rp-l2tp uses a global unconnected socket bound to (INADDR_ANY, 1701) and one connected socket per tunnel after parameter negotiation.
After ten sockets were open and due to mixed parameters to
udp[46]_lib_lookup2() kernel started to drop packets.
---
net/ipv4/udp.c +2 -2
@@ -471,8 +471,8 @@ static struct sock *__udp4_lib_lookup(stif (hslot->count < hslot2->count) goto begin; - result =udp4_lib_lookup2 (net,INADDR_ANY , sport, - daddr, hnum, dif, + result =udp4_lib_lookup2 (net, saddr, sport, +INADDR_ANY , hnum, dif, hslot2, slot2); }rcu_read_unlock ();
net/ipv6/udp.c +2 -2
@@ -258,8 +258,8 @@ static struct sock *__udp6_lib_lookup(stif (hslot->count < hslot2->count) goto begin; - result =udp6_lib_lookup2 (net, &in6addr_any, sport, - daddr, hnum, dif, + result =udp6_lib_lookup2 (net, saddr, sport, + &in6addr_any, hnum, dif, hslot2, slot2); }rcu_read_unlock ();
Quoted 9 lines · Le jeudi 08 avril 2010 à 16:56 +0200, Jorge Boncompte [DTI2] a écrit :
Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and
5051ebd275de672b807c28d93002c2fb0514a3c9("ipv[46]: udp: optimize unicast RX path") broke some programs.After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an
down, after the 10th tunnel came up. My modified rp-l2tp uses a global unconnected socket bound to (INADDR_ANY, 1701) and one connected socket per tunnel after parameter negotiation.
Quoted 4 lines
After ten sockets were open and due to mixed parameters to
udp[46]_lib_lookup2() kernel started to drop packets.Signed-off-by Jorge Boncompte [DTI2] <[email protected]>
Oops...
Thank you for finding this bug, this is indeed the right fix.
This is a stable candidate. David, can you catch it even if Jorge didnt sent you a copy ?
David Miller
maintainerFrom: Eric Dumazet <[email protected]>
Date: Thu, 08 Apr 2010 17:12:27 +0200
Quoted 2 lines
This is a stable candidate. David, can you catch it even if Jorge didnt sent you a copy ?
It went to netdev and thus patchwork and I both have it :-)
David Miller
maintainerFrom: Eric Dumazet <[email protected]>
Date: Thu, 08 Apr 2010 17:12:27 +0200
Quoted 14 lines · Le jeudi 08 avril 2010 à 16:56 +0200, Jorge Boncompte [DTI2] a écrit :
Quoted 13 lines
Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and
5051ebd275de672b807c28d93002c2fb0514a3c9("ipv[46]: udp: optimize unicast RX path") broke some programs.After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an
down, after the 10th tunnel came up. My modified rp-l2tp uses a global unconnected socket bound to (INADDR_ANY, 1701) and one connected socket per tunnel after parameter negotiation.After ten sockets were open and due to mixed parameters to
udp[46]_lib_lookup2() kernel started to drop packets.Signed-off-by Jorge Boncompte [DTI2] <[email protected]>
...
Quoted 1 line
Signed-off-by Eric Dumazet <[email protected]>
Applied and queued up for -stable.