network: add Protocol= to vlan netdev (#17794)
This commit is contained in:
@@ -24,6 +24,12 @@ static int netdev_vlan_fill_message_create(NetDev *netdev, Link *link, sd_netlin
|
||||
if (r < 0)
|
||||
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VLAN_ID attribute: %m");
|
||||
|
||||
if (v->protocol >= 0) {
|
||||
r = sd_netlink_message_append_u16(req, IFLA_VLAN_PROTOCOL, htobe16(v->protocol));
|
||||
if (r < 0)
|
||||
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VLAN_PROTOCOL attribute: %m");
|
||||
}
|
||||
|
||||
if (v->gvrp != -1) {
|
||||
flags.mask |= VLAN_FLAG_GVRP;
|
||||
SET_FLAG(flags.flags, VLAN_FLAG_GVRP, v->gvrp);
|
||||
@@ -76,6 +82,7 @@ static void vlan_init(NetDev *netdev) {
|
||||
assert(v);
|
||||
|
||||
v->id = VLANID_INVALID;
|
||||
v->protocol = -1;
|
||||
v->gvrp = -1;
|
||||
v->mvrp = -1;
|
||||
v->loose_binding = -1;
|
||||
|
||||
Reference in New Issue
Block a user