summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoachim Wiberg <troglobit@gmail.com>2022-03-28 15:09:43 (GMT)
committerThomas Haller <thaller@redhat.com>2022-03-28 15:45:41 (GMT)
commit4e153bc272e52c7b759ab124ec17b7fe95a496a4 (patch)
treed15f95a3854139656f6e1d2f8b9a745ce6f16b32
parentb7256d3da8d7f63b9f0839fe0323da53860ac8a8 (diff)
downloadlibnl-4e153bc272e52c7b759ab124ec17b7fe95a496a4.zip
libnl-4e153bc272e52c7b759ab124ec17b7fe95a496a4.tar.gz
libnl-4e153bc272e52c7b759ab124ec17b7fe95a496a4.tar.bz2
route/link: add VLAN bridge binding flag
Adds support for the new VLAN_FLAG_BRIDGE_BINDING, for VLAN interfaces created on top of a VLAN aware bridge. For details, see the kernel patch: https://lore.kernel.org/netdev/20190418173535.22925-1-mmanning@vyatta.att-mail.com/ Signed-off-by: Joachim Wiberg <troglobit@gmail.com> https://github.com/thom311/libnl/pull/303
-rw-r--r--include/linux-private/linux/if_vlan.h9
-rw-r--r--lib/route/link/vlan.c1
2 files changed, 6 insertions, 4 deletions
diff --git a/include/linux-private/linux/if_vlan.h b/include/linux-private/linux/if_vlan.h
index 18a15da..04bca79 100644
--- a/include/linux-private/linux/if_vlan.h
+++ b/include/linux-private/linux/if_vlan.h
@@ -32,10 +32,11 @@ enum vlan_ioctl_cmds {
};
enum vlan_flags {
- VLAN_FLAG_REORDER_HDR = 0x1,
- VLAN_FLAG_GVRP = 0x2,
- VLAN_FLAG_LOOSE_BINDING = 0x4,
- VLAN_FLAG_MVRP = 0x8,
+ VLAN_FLAG_REORDER_HDR = 0x1,
+ VLAN_FLAG_GVRP = 0x2,
+ VLAN_FLAG_LOOSE_BINDING = 0x4,
+ VLAN_FLAG_MVRP = 0x8,
+ VLAN_FLAG_BRIDGE_BINDING = 0x10,
};
enum vlan_name_types {
diff --git a/lib/route/link/vlan.c b/lib/route/link/vlan.c
index a2c4733..f7e0ff0 100644
--- a/lib/route/link/vlan.c
+++ b/lib/route/link/vlan.c
@@ -641,6 +641,7 @@ static const struct trans_tbl vlan_flags[] = {
__ADD(VLAN_FLAG_GVRP, gvrp),
__ADD(VLAN_FLAG_LOOSE_BINDING, loose_binding),
__ADD(VLAN_FLAG_MVRP, mvrp),
+ __ADD(VLAN_FLAG_BRIDGE_BINDING, bridge_binding),
};
/**