ipvlan: introduce 'private' attribute for all existing modes.

IPvlan has always operated in bridge mode. However there are scenarios
where each slave should be able to talk through the master device but
not necessarily across each other. Think of an environment where each
of a namespace is a private and independant customer. In this scenario
the machine which is hosting these namespaces neither want to tell who
their neighbor is nor the individual namespaces care to talk to neighbor
on short-circuited network path.

This patch implements the mode that is very similar to the 'private' mode
in macvlan where individual slaves can send and receive traffic through
the master device, just that they can not talk among slave devices.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Mahesh Bandewar
2017-10-26 15:09:21 -07:00
committed by David S. Miller
parent 995231c820
commit a190d04db9
5 changed files with 94 additions and 8 deletions

View File

@@ -465,6 +465,7 @@ enum macsec_validation_type {
enum {
IFLA_IPVLAN_UNSPEC,
IFLA_IPVLAN_MODE,
IFLA_IPVLAN_FLAGS,
__IFLA_IPVLAN_MAX
};
@@ -477,6 +478,8 @@ enum ipvlan_mode {
IPVLAN_MODE_MAX
};
#define IPVLAN_F_PRIVATE 0x01
/* VXLAN section */
enum {
IFLA_VXLAN_UNSPEC,