macvlan: Only deliver one copy of the frame to the macvlan interface
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 13 Oct 2017 20:40:24 +0000 (13:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:36 +0000 (10:10 +0100)
commitf7af60377ec05e2452a73c349b4fa2a4196480c8
tree1aef965163a1d25c3d77b961a6dd9b9a031d3fbc
parentd9490e7ca55bafac97fa65a3d34244386469eb50
macvlan: Only deliver one copy of the frame to the macvlan interface

[ Upstream commit dd6b9c2c332b40f142740d1b11fb77c653ff98ea ]

This patch intoduces a slight adjustment for macvlan to address the fact
that in source mode I was seeing two copies of any packet addressed to the
macvlan interface being delivered where there should have been only one.

The issue appears to be that one copy was delivered based on the source MAC
address and then the second copy was being delivered based on the
destination MAC address. To fix it I am just treating a unicast address
match as though it is not a match since source based macvlan isn't supposed
to be matching based on the destination MAC anyway.

Fixes: 79cf79abce71 ("macvlan: add source mode")
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/macvlan.c