summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJethro Beekman <kernel@jbeekman.nl>2021-04-25 11:22:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-02-06 16:39:58 +0100
commit1222f199291c429567551a0ea1090faa8a86f013 (patch)
tree1ee590a826be726bed57bf00b093dfc2d8d86c2d /include
parentf9c5c5b791d3850570796f9e067629474e613796 (diff)
macvlan: Add nodst option to macvlan type source
[ Upstream commit 427f0c8c194b22edcafef1b0a42995ddc5c2227d ] The default behavior for source MACVLAN is to duplicate packets to appropriate type source devices, and then do the normal destination MACVLAN flow. This patch adds an option to skip destination MACVLAN processing if any matching source MACVLAN device has the option set. This allows setting up a "catch all" device for source MACVLAN: create one or more devices with type source nodst, and one device with e.g. type vepa, and incoming traffic will be received on exactly one device. v2: netdev wants non-standard line length Signed-off-by: Jethro Beekman <kernel@jbeekman.nl> Signed-off-by: David S. Miller <davem@davemloft.net> Stable-dep-of: 7470a7a63dc1 ("macvlan: fix possible UAF in macvlan_forward_source()") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/if_link.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 9334f2128bb2..33c3b684f6de 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -609,6 +609,7 @@ enum macvlan_macaddr_mode {
};
#define MACVLAN_FLAG_NOPROMISC 1
+#define MACVLAN_FLAG_NODST 2 /* skip dst macvlan if matching src macvlan */
/* VRF section */
enum {