[DEV_ATTR_GRO] = { .name = "gro", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_MASTER] = { .name = "conduit", .type = BLOBMSG_TYPE_STRING },
[DEV_ATTR_EEE] = { .name = "eee", .type = BLOBMSG_TYPE_BOOL },
+ [DEV_ATTR_TAGS] = { .name = "tags", .type = BLOBMSG_TYPE_ARRAY },
};
const struct uci_blob_param_list device_attr_list = {
free(dev->config_auth_vlans);
dev->config_auth_vlans = cur ? blob_memdup(cur) : NULL;
+ cur = tb[DEV_ATTR_TAGS];
+ free(dev->tags);
+ dev->tags = cur ? blob_memdup(cur) : NULL;
+
device_set_extra_vlans(dev, tb[DEV_ATTR_VLAN]);
device_set_disabled(dev, disabled);
}
free(dev->auth_vlans);
free(dev->config);
device_cleanup(dev);
+ free(dev->tags);
free(dev->config_auth_vlans);
free(dev->extra_vlan);
dev->type->free(dev);
blobmsg_add_u8(b, "carrier", !!dev->link_active);
blobmsg_add_u8(b, "auth_status", !!dev->auth_status);
+ if (dev->tags)
+ blobmsg_add_blob(b, dev->tags);
+
if (dev->type->dump_info)
dev->type->dump_info(dev, b);
else
DEV_ATTR_GRO,
DEV_ATTR_MASTER,
DEV_ATTR_EEE,
+ DEV_ATTR_TAGS,
__DEV_ATTR_MAX,
};
struct kvlist vlan_aliases;
struct blob_attr *config_auth_vlans;
struct blob_attr *auth_vlans;
+ struct blob_attr *tags;
char ifname[IFNAMSIZ];
int ifindex;
IFACE_ATTR_IP6IFACEID,
IFACE_ATTR_FORCE_LINK,
IFACE_ATTR_IP6WEIGHT,
+ IFACE_ATTR_TAGS,
IFACE_ATTR_MAX
};
[IFACE_ATTR_IP6IFACEID] = { .name = "ip6ifaceid", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_FORCE_LINK] = { .name = "force_link", .type = BLOBMSG_TYPE_BOOL },
[IFACE_ATTR_IP6WEIGHT] = { .name = "ip6weight", .type = BLOBMSG_TYPE_INT32 },
+ [IFACE_ATTR_TAGS] = { .name = "tags", .type = BLOBMSG_TYPE_ARRAY },
};
const struct uci_blob_param_list interface_attr_list = {
}
iface->config = config;
+ iface->tags = tb[IFACE_ATTR_TAGS];
vlist_add(&interfaces, &iface->node, iface->name);
if (name) {
})
if_old->config = if_new->config;
+ if_old->tags = if_new->tags;
if (if_old->config_autostart != if_new->config_autostart) {
if (if_old->config_autostart)
reload = true;
struct device_user l3_dev;
struct blob_attr *config;
+ struct blob_attr *tags;
/* primary protocol state */
const struct proto_handler *proto_handler;
if (iface->jail_device)
blobmsg_add_string(&b, "jail_device", iface->jail_device);
+ if (iface->tags)
+ blobmsg_add_blob(&b, iface->tags);
if (iface->state == IFS_UP) {
if (iface->updated) {