networkd: add support for setting vlan_tunnel on bridge ports
This commit is contained in:
committed by
Yu Watanabe
parent
2e3efb1884
commit
c88adbc01d
@@ -386,6 +386,7 @@ Bridge.Priority, config_parse_bridge_port_priority,
|
||||
Bridge.MulticastRouter, config_parse_multicast_router, 0, offsetof(Network, multicast_router)
|
||||
Bridge.Locked, config_parse_tristate, 0, offsetof(Network, bridge_locked)
|
||||
Bridge.MACAuthenticationBypass, config_parse_tristate, 0, offsetof(Network, bridge_mac_authentication_bypass)
|
||||
Bridge.VLANTunnel, config_parse_tristate, 0, offsetof(Network, bridge_vlan_tunnel)
|
||||
BridgeFDB.MACAddress, config_parse_fdb_hwaddr, 0, 0
|
||||
BridgeFDB.VLANId, config_parse_fdb_vlan_id, 0, 0
|
||||
BridgeFDB.Destination, config_parse_fdb_destination, 0, 0
|
||||
|
||||
@@ -458,6 +458,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
||||
.multicast_router = _MULTICAST_ROUTER_INVALID,
|
||||
.bridge_locked = -1,
|
||||
.bridge_mac_authentication_bypass = -1,
|
||||
.bridge_vlan_tunnel = -1,
|
||||
|
||||
.bridge_vlan_pvid = BRIDGE_VLAN_KEEP_PVID,
|
||||
|
||||
|
||||
@@ -299,6 +299,7 @@ struct Network {
|
||||
MulticastRouter multicast_router;
|
||||
int bridge_locked;
|
||||
int bridge_mac_authentication_bypass;
|
||||
int bridge_vlan_tunnel;
|
||||
|
||||
/* Bridge VLAN */
|
||||
uint16_t bridge_vlan_pvid;
|
||||
|
||||
@@ -332,6 +332,12 @@ static int link_configure_fill_message(
|
||||
return r;
|
||||
}
|
||||
|
||||
if (link->network->bridge_vlan_tunnel >= 0) {
|
||||
r = sd_netlink_message_append_u8(req, IFLA_BRPORT_VLAN_TUNNEL, link->network->bridge_vlan_tunnel);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
r = sd_netlink_message_close_container(req);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user