diff options
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 6 |
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) { |