提交 1223c67c 编写于 作者: J Jorge Boncompte [DTI2] 提交者: David S. Miller

udp: fix for unicast RX path optimization

Commits 5051ebd2 and
5051ebd2 ("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: NJorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2488f56d
...@@ -471,8 +471,8 @@ static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, ...@@ -471,8 +471,8 @@ static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
if (hslot->count < hslot2->count) if (hslot->count < hslot2->count)
goto begin; goto begin;
result = udp4_lib_lookup2(net, INADDR_ANY, sport, result = udp4_lib_lookup2(net, saddr, sport,
daddr, hnum, dif, INADDR_ANY, hnum, dif,
hslot2, slot2); hslot2, slot2);
} }
rcu_read_unlock(); rcu_read_unlock();
......
...@@ -258,8 +258,8 @@ static struct sock *__udp6_lib_lookup(struct net *net, ...@@ -258,8 +258,8 @@ static struct sock *__udp6_lib_lookup(struct net *net,
if (hslot->count < hslot2->count) if (hslot->count < hslot2->count)
goto begin; goto begin;
result = udp6_lib_lookup2(net, &in6addr_any, sport, result = udp6_lib_lookup2(net, saddr, sport,
daddr, hnum, dif, &in6addr_any, hnum, dif,
hslot2, slot2); hslot2, slot2);
} }
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册