Skip to content

Commit

Permalink
udp: fix for unicast RX path optimization
Browse files Browse the repository at this point in the history
Commits 5051ebd and
5051ebd ("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>
  • Loading branch information
Jorge Boncompte [DTI2] authored and David S. Miller committed Apr 8, 2010
1 parent 2488f56 commit 1223c67
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/udp.c
Original file line number Diff line number Diff line change
@@ -471,8 +471,8 @@ static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
if (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();
4 changes: 2 additions & 2 deletions net/ipv6/udp.c
Original file line number Diff line number Diff line change
@@ -258,8 +258,8 @@ static struct sock *__udp6_lib_lookup(struct net *net,
if (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();

0 comments on commit 1223c67

Please sign in to comment.