diff options
author | Steven Barth <steven@midlink.org> | 2013-10-18 14:18:32 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-10-18 14:18:32 +0200 |
commit | b08f841685bf67b3f4f8cc3e8f667c80878916a8 (patch) | |
tree | b54bb7bfcadbcf057d1134e4487b3bcbff6d8106 /interface.c | |
parent | e93c42c036c4b4df1f65f261def31cf1a429e942 (diff) |
Add option "delegate" to toggle prefix delegation
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/interface.c b/interface.c index 0620617..698fedb 100644 --- a/interface.c +++ b/interface.c @@ -43,6 +43,7 @@ enum { IFACE_ATTR_IP4TABLE, IFACE_ATTR_IP6TABLE, IFACE_ATTR_IP6CLASS, + IFACE_ATTR_DELEGATE, IFACE_ATTR_MAX }; @@ -61,6 +62,7 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = { [IFACE_ATTR_IP4TABLE] = { .name = "ip4table", .type = BLOBMSG_TYPE_STRING }, [IFACE_ATTR_IP6TABLE] = { .name = "ip6table", .type = BLOBMSG_TYPE_STRING }, [IFACE_ATTR_IP6CLASS] = { .name = "ip6class", .type = BLOBMSG_TYPE_ARRAY }, + [IFACE_ATTR_DELEGATE] = { .name = "delegate", .type = BLOBMSG_TYPE_BOOL }, }; static const struct uci_blob_param_info iface_attr_info[IFACE_ATTR_MAX] = { @@ -605,6 +607,8 @@ interface_init(struct interface *iface, const char *name, DPRINTF("Failed to resolve routing table: %s\n", (char *) blobmsg_data(cur)); } + iface->proto_ip.no_delegation = !blobmsg_get_bool_default(tb[IFACE_ATTR_DELEGATE], true); + iface->config_autostart = iface->autostart; iface->dynamic = dynamic; |