diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2022-07-27 07:34:39 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2022-08-11 17:07:58 +0200 |
commit | 87fbefd95043c24ccd3d5639a90721a5ed0b8267 (patch) | |
tree | 47913101bd3a679086844bb4c9faf36febf7d2e2 /ubus.c | |
parent | 39ef9fe1388029c476db62889ef2ef5661613321 (diff) | |
download | netifd-87fbefd95043c24ccd3d5639a90721a5ed0b8267.tar.gz |
interface: support "zone" config option
Many protocol handlers support "zone" option independently and they pass
it in the "data". Then it's read e.g. by a firewall[34].
Add support for "zone" directly to the netifd so:
1. It works for all protocols
2. Handlers don't have to duplicate code
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'ubus.c')
-rw-r--r-- | ubus.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -918,6 +918,9 @@ netifd_dump_status(struct interface *iface) } 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); |