summaryrefslogtreecommitdiff
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2017-10-13 23:40:31 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-15 04:46:36 +0300
commitc8c41ea1bd707eb032e248c55d640f32c950ed19 (patch)
tree27d6dacd64d59e8339ac58feca9ba929e7ebaeb6 /drivers/net/macvlan.c
parentdd6b9c2c332b40f142740d1b11fb77c653ff98ea (diff)
downloadlinux-c8c41ea1bd707eb032e248c55d640f32c950ed19.tar.xz
macvlan: Only update pkt_type if destination MAC address matches
This patch updates the pkt_type to PACKET_HOST only if the destination MAC address matches on the on the source based macvlan. It didn't make sense to be updating broadcast, multicast, and non-local destined frames with PACKET_HOST. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index a4ae8cd0f660..1e1df54c5d31 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -413,7 +413,9 @@ static void macvlan_forward_source_one(struct sk_buff *skb,
len = nskb->len + ETH_HLEN;
nskb->dev = dev;
- nskb->pkt_type = PACKET_HOST;
+
+ if (ether_addr_equal_64bits(eth_hdr(skb)->h_dest, dev->dev_addr))
+ nskb->pkt_type = PACKET_HOST;
ret = netif_rx(nskb);
macvlan_count_rx(vlan, len, ret == NET_RX_SUCCESS, false);