aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2010-04-08 00:56:48 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-08 14:29:13 -0400
commit1223c67c0938d2df309fde618bd82c87c8c1af04 (patch)
tree12445eb8f4ab8acece9cd96e337ce49b29e3f31a
parent2488f56d3699b84ee51d2940d1347345b8f9b0e1 (diff)
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. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/udp.c4
-rw-r--r--net/ipv6/udp.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 7af756d0f931..24272c4cfbca 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -471,8 +471,8 @@ static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
471 if (hslot->count < hslot2->count) 471 if (hslot->count < hslot2->count)
472 goto begin; 472 goto begin;
473 473
474 result = udp4_lib_lookup2(net, INADDR_ANY, sport, 474 result = udp4_lib_lookup2(net, saddr, sport,
475 daddr, hnum, dif, 475 INADDR_ANY, hnum, dif,
476 hslot2, slot2); 476 hslot2, slot2);
477 } 477 }
478 rcu_read_unlock(); 478 rcu_read_unlock();
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 3c0c9c755c92..787e480cc096 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -258,8 +258,8 @@ static struct sock *__udp6_lib_lookup(struct net *net,
258 if (hslot->count < hslot2->count) 258 if (hslot->count < hslot2->count)
259 goto begin; 259 goto begin;
260 260
261 result = udp6_lib_lookup2(net, &in6addr_any, sport, 261 result = udp6_lib_lookup2(net, saddr, sport,
262 daddr, hnum, dif, 262 &in6addr_any, hnum, dif,
263 hslot2, slot2); 263 hslot2, slot2);
264 } 264 }
265 rcu_read_unlock(); 265 rcu_read_unlock();