[PATCH] vlan: add support for IFLA_VLAN_PROTOCOL
Thomas Haller
thaller at redhat.com
Mon May 12 05:31:55 PDT 2014
On Wed, 2014-05-07 at 16:05 +0530, Susant Sahani wrote:
> This patch adds support for IFLA_VLAN_PROTOCOL
>
> Signed-off-by: Susant Sahani <susant at redhat.com>
Patch applied as:
https://github.com/thom311/libnl/commit/430eb4004ab7f93fd840e9836d4bc9220d3c406d
Thanks,
Thomas
PS: I modified the patch slightly before applying:
diff --git c/lib/route/link/vlan.c w/lib/route/link/vlan.c
index 6f68ac4..1a0d916 100644
--- c/lib/route/link/vlan.c
+++ w/lib/route/link/vlan.c
@@ -60,7 +60,7 @@ static struct nla_policy vlan_policy[IFLA_VLAN_MAX+1] = {
[IFLA_VLAN_FLAGS] = { .minlen = sizeof(struct ifla_vlan_flags) },
[IFLA_VLAN_INGRESS_QOS] = { .type = NLA_NESTED },
[IFLA_VLAN_EGRESS_QOS] = { .type = NLA_NESTED },
- [IFLA_VLAN_PROTOCOL] = { .type = NLA_U16 },
+ [IFLA_VLAN_PROTOCOL] = { .type = NLA_U16 },
};
static int vlan_alloc(struct rtnl_link *link)
@@ -98,7 +98,7 @@ static int vlan_parse(struct rtnl_link *link, struct nlattr *data,
}
if (tb[IFLA_VLAN_PROTOCOL]) {
- vii->vi_protocol = nla_get_u16(tb[IFLA_VLAN_PROTOCOL]);
+ vi->vi_protocol = nla_get_u16(tb[IFLA_VLAN_PROTOCOL]);
vi->vi_mask |= VLAN_HAS_PROTOCOL;
}
@@ -423,7 +423,7 @@ int rtnl_link_vlan_get_id(struct rtnl_link *link)
}
/**
- * Set VLAN PROTOCOL
+ * Set VLAN protocol
* @arg link Link object
* @arg protocol VLAN protocol
*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140512/d799aa3d/attachment.sig>
More information about the libnl
mailing list