l2tp: small cleanup
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 21 Oct 2010 11:39:09 +0000 (04:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Oct 2010 11:39:09 +0000 (04:39 -0700)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_ip.c

index 226a0ae3bcfd7891775ec83c7035d99e2539923f..1c770c0644d1a3111eddbac4463ecd8bd4821850 100644 (file)
@@ -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;