[PATCH 1/1] route/vlan: allow clearing vlan ingress map

Thomas Haller thaller at redhat.com
Thu Nov 19 07:26:15 PST 2015


On Wed, 2015-10-21 at 18:01 +0200, Thomas Haller wrote:
> 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 at redhat.com>
> ---
>  include/netlink/utils.h |  8 ++++++++
>  lib/route/link/vlan.c   | 18 ++++++++++++++++--
>  lib/utils.c             |  2 +-
>  3 files changed, 25 insertions(+), 3 deletions(-)
> 

merged as https://github.com/thom311/libnl/commit/7ea15f60a726de67f02e6868a8125a59570e956d
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20151119/58e4504e/attachment.sig>


More information about the libnl mailing list