IFACE_ATTR_IFNAME, /* Backward compatibility */
IFACE_ATTR_PROTO,
IFACE_ATTR_AUTO,
+ IFACE_ATTR_ZONE,
IFACE_ATTR_JAIL,
IFACE_ATTR_JAIL_DEVICE,
IFACE_ATTR_JAIL_IFNAME,
[IFACE_ATTR_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_IFNAME] = { .name = "ifname", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_AUTO] = { .name = "auto", .type = BLOBMSG_TYPE_BOOL },
+ [IFACE_ATTR_ZONE] = { .name = "zone", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_JAIL] = { .name = "jail", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_JAIL_DEVICE] = { .name = "jail_device", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_JAIL_IFNAME] = { .name = "jail_ifname", .type = BLOBMSG_TYPE_STRING },
blobmsg_parse(iface_attrs, IFACE_ATTR_MAX, tb,
blob_data(config), blob_len(config));
+ iface->zone = NULL;
+ if ((cur = tb[IFACE_ATTR_ZONE]))
+ iface->zone = strdup(blobmsg_get_string(cur));
+
if ((cur = tb[IFACE_ATTR_PROTO]))
proto_name = blobmsg_data(cur);
}
a = blobmsg_open_table(&b, "data");
+
+ if (iface->zone)
+ blobmsg_add_string(&b, "zone", iface->zone);
avl_for_each_element(&iface->data, data, node)
blobmsg_add_blob(&b, data->data);