aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet/af_packet.c
diff options
context:
space:
mode:
authorOctavian Purdila <opurdila@ixiacom.com>2009-11-25 18:14:13 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-25 18:14:13 -0500
commit09ad9bc752519cc167d0a573e1acf69b5c707c67 (patch)
tree0e190a9ffb90d7e0534136c3e9f31dce02f423c3 /net/packet/af_packet.c
parent4ba3eb034fb6fd1990ccc5a6d71d5abcda37b905 (diff)
net: use net_eq to compare nets
Generated with the following semantic patch @@ struct net *n1; struct net *n2; @@ - n1 == n2 + net_eq(n1, n2) @@ struct net *n1; struct net *n2; @@ - n1 != n2 + !net_eq(n1, n2) applied over {include,net,drivers/net}. Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/af_packet.c')
-rw-r--r--net/packet/af_packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c620bd9ae3de..940fc20b2b50 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -365,7 +365,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,
365 if (skb->pkt_type == PACKET_LOOPBACK) 365 if (skb->pkt_type == PACKET_LOOPBACK)
366 goto out; 366 goto out;
367 367
368 if (dev_net(dev) != sock_net(sk)) 368 if (!net_eq(dev_net(dev), sock_net(sk)))
369 goto out; 369 goto out;
370 370
371 skb = skb_share_check(skb, GFP_ATOMIC); 371 skb = skb_share_check(skb, GFP_ATOMIC);
@@ -553,7 +553,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
553 sk = pt->af_packet_priv; 553 sk = pt->af_packet_priv;
554 po = pkt_sk(sk); 554 po = pkt_sk(sk);
555 555
556 if (dev_net(dev) != sock_net(sk)) 556 if (!net_eq(dev_net(dev), sock_net(sk)))
557 goto drop; 557 goto drop;
558 558
559 skb->dev = dev; 559 skb->dev = dev;
@@ -674,7 +674,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
674 sk = pt->af_packet_priv; 674 sk = pt->af_packet_priv;
675 po = pkt_sk(sk); 675 po = pkt_sk(sk);
676 676
677 if (dev_net(dev) != sock_net(sk)) 677 if (!net_eq(dev_net(dev), sock_net(sk)))
678 goto drop; 678 goto drop;
679 679
680 if (dev->header_ops) { 680 if (dev->header_ops) {