summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-10-21 16:01:02 (GMT)
committerThomas Haller <thaller@redhat.com>2015-11-19 15:20:39 (GMT)
commit7ea15f60a726de67f02e6868a8125a59570e956d (patch)
treedad25eb0715fb1a6a9abfeaa82dc4b433e3cbed4 /include
parenta0b2710ed924d5107eae331643304e7364b1421e (diff)
downloadlibnl-7ea15f60a726de67f02e6868a8125a59570e956d.zip
libnl-7ea15f60a726de67f02e6868a8125a59570e956d.tar.gz
libnl-7ea15f60a726de67f02e6868a8125a59570e956d.tar.bz2
route/vlan: allow clearing vlan ingress map
An entry of the ingress map can be cleared by setting the "to" part to zero. Previously, vlan_put_attrs() would skip over zero "to" and thus the user cannot unset an ingress map entry. Add a modified-mask to record the state of each ingress map entry and also sent explicit zeros to kernel. when we receive a IFLA_VLAN_INGRESS_QOS message from kernel, vlan_parse() similarly sets the received entries as modified. This preserves previous behavior when using a received object to modify a vlan. Add a capability NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR to indicate the behavioral change. Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/netlink/utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/netlink/utils.h b/include/netlink/utils.h
index ea853a8..babe1b2 100644
--- a/include/netlink/utils.h
+++ b/include/netlink/utils.h
@@ -177,6 +177,14 @@ enum {
NL_CAPABILITY_RTNL_LINK_PARSE_GRE_REMOTE = 13,
#define NL_CAPABILITY_RTNL_LINK_PARSE_GRE_REMOTE NL_CAPABILITY_RTNL_LINK_PARSE_GRE_REMOTE
+ /**
+ * Don't skip over vlan ingress-map entries with "to" field zero when serializing
+ * a netlink message. Previously such entires would be ignored which inhibits the
+ * user from clearing ingress map entries.
+ */
+ NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR = 14,
+#define NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR
+
__NL_CAPABILITY_MAX,
NL_CAPABILITY_MAX = (__NL_CAPABILITY_MAX - 1),
#define NL_CAPABILITY_MAX NL_CAPABILITY_MAX