This setting is compulsory.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>Protocol=</varname></term>
+ <listitem>
+ <para>Allows setting the protocol used for the VLAN interface. Takes <literal>802.1q</literal> or,
+ <literal>802.1ad</literal>, and defaults to unset and kernel's default is used.</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><varname>GVRP=</varname></term>
<listitem>
NetDev.MTUBytes, config_parse_mtu, AF_UNSPEC, offsetof(NetDev, mtu)
NetDev.MACAddress, config_parse_hwaddr, 0, offsetof(NetDev, mac)
VLAN.Id, config_parse_vlanid, 0, offsetof(VLan, id)
+VLAN.Protocol, config_parse_vlanprotocol, 0, offsetof(VLan, protocol)
VLAN.GVRP, config_parse_tristate, 0, offsetof(VLan, gvrp)
VLAN.MVRP, config_parse_tristate, 0, offsetof(VLan, mvrp)
VLAN.LooseBinding, config_parse_tristate, 0, offsetof(VLan, loose_binding)
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);
assert(v);
v->id = VLANID_INVALID;
+ v->protocol = -1;
v->gvrp = -1;
v->mvrp = -1;
v->loose_binding = -1;