net: bridge: vlan options: move the tunnel command to the nested attribute

Now that we have a nested tunnel info attribute we can add a separate
one for the tunnel command and require it explicitly from user-space. It
must be one of RTM_SETLINK/DELLINK. Only RTM_SETLINK requires a valid
tunnel id, DELLINK just removes it if it was set before. This allows us
to have all tunnel attributes and control in one place, thus removing
the need for an outside vlan info flag.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Nikolay Aleksandrov
2020-03-20 13:23:03 +02:00
committed by David S. Miller
parent fa388f29a9
commit c443758b21
2 changed files with 30 additions and 17 deletions

View File

@@ -131,7 +131,6 @@ enum {
#define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */
#define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */
#define BRIDGE_VLAN_INFO_ONLY_OPTS (1<<6) /* Skip create/delete/flags */
#define BRIDGE_VLAN_INFO_REMOVE_TUN (1<<7) /* Remove tunnel mapping */
struct bridge_vlan_info {
__u16 flags;
@@ -219,6 +218,7 @@ enum {
enum {
BRIDGE_VLANDB_TINFO_UNSPEC,
BRIDGE_VLANDB_TINFO_ID,
BRIDGE_VLANDB_TINFO_CMD,
__BRIDGE_VLANDB_TINFO_MAX,
};
#define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)