diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-11-20 18:58:10 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-11-20 19:01:17 +0100 |
commit | 4544f026bb0996adb6d95224031f0ba35cb8c046 (patch) | |
tree | 0ed33ee832d2ef7037b0bf15ea884c688b2db3c7 /device.h | |
parent | 5e18d5b9ccb189efb914733e7b74073f5c75e0df (diff) | |
download | netifd-4544f026bb0996adb6d95224031f0ba35cb8c046.tar.gz |
bridge-vlan: add support for defining aliases for vlan ids
When defining a bridge-vlan like this:
config bridge-vlan
option device 'switch0'
option vlan '1'
option ports 'lan1 lan2 lan3 lan4'
option alias 'lan'
You can use switch0.lan instead of switch0.1 to refer to the VLAN.
This ensures that the VLAN ID can be kept in a single place in the config
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -16,6 +16,7 @@ #include <libubox/avl.h> #include <libubox/safe_list.h> +#include <libubox/kvlist.h> #include <netinet/in.h> struct device; @@ -186,6 +187,7 @@ struct device { struct safe_list aliases; struct vlist_tree vlans; + struct kvlist vlan_aliases; char ifname[IFNAMSIZ + 1]; int ifindex; |