]> git.baikalelectronics.ru Git - kernel.git/commit
macvlan: Add nodst option to macvlan type source
authorJethro Beekman <kernel@jbeekman.nl>
Sun, 25 Apr 2021 09:22:03 +0000 (11:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Apr 2021 01:35:01 +0000 (18:35 -0700)
commit6c90ef918eb9a082f1655b6383477790c5edd26b
treeb951db0ad2e9ab59002c76d2d9f4fc8ac8e93a2e
parent8aa528801880fea037debf7ae52c2dcd4fd75e1a
macvlan: Add nodst option to macvlan type source

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>
drivers/net/macvlan.c
include/uapi/linux/if_link.h