From: Eric Dumazet Date: Thu, 21 Oct 2010 11:39:09 +0000 (-0700) Subject: l2tp: small cleanup X-Git-Tag: v2.6.37-rc1~147^2~6 X-Git-Url: https://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=e83726b0460f4741c8f10e1488fbcc0a9e5f0b7e l2tp: small cleanup Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c index 226a0ae3bcf..1c770c0644d 100644 --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c @@ -65,9 +65,7 @@ static struct sock *__l2tp_ip_bind_lookup(struct net *net, __be32 laddr, int dif continue; if ((l2tp->conn_id == tunnel_id) && -#ifdef CONFIG_NET_NS - (sk->sk_net == net) && -#endif + net_eq(sock_net(sk), net) && !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && !(sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif)) goto found;