l2tp: kzalloc with swapped params in l2tp_dfs_seq_open
[linux-2.6.git] / net / l2tp / l2tp_ip.c
index 226a0ae..0bf6a59 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;
@@ -578,7 +576,7 @@ out:
        return copied;
 }
 
-struct proto l2tp_ip_prot = {
+static struct proto l2tp_ip_prot = {
        .name              = "L2TP/IP",
        .owner             = THIS_MODULE,
        .init              = l2tp_ip_open,