summaryrefslogtreecommitdiffhomepage
path: root/src/config.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-04-01 11:19:31 +0200
committerSteven Barth <steven@midlink.org>2014-04-01 11:19:31 +0200
commitd12c7b8c39bc0f727bde5aa34595e9a581891dca (patch)
treece1cbba4f2e879720f30679a66f40f26288e62e8 /src/config.c
parent2b4200f2510874a3ee9c09f594d5ab6340ffb336 (diff)
Complete managed PD/CER-ID support
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 7f51585..a392af7 100644
--- a/src/config.c
+++ b/src/config.c
@@ -36,6 +36,8 @@ enum {
IFACE_ATTR_RA_MANAGEMENT,
IFACE_ATTR_RA_OFFLINK,
IFACE_ATTR_RA_PREFERENCE,
+ IFACE_ATTR_PD_MANAGER,
+ IFACE_ATTR_PD_CER,
IFACE_ATTR_NDPROXY_ROUTING,
IFACE_ATTR_NDPROXY_SLAVE,
IFACE_ATTR_NDPROXY_STATIC,
@@ -59,6 +61,8 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = {
[IFACE_ATTR_NDP] = { .name = "ndp", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_DNS] = { .name = "dns", .type = BLOBMSG_TYPE_ARRAY },
[IFACE_ATTR_DOMAIN] = { .name = "domain", .type = BLOBMSG_TYPE_ARRAY },
+ [IFACE_ATTR_PD_MANAGER] = { .name = "pd_manager", .type = BLOBMSG_TYPE_STRING },
+ [IFACE_ATTR_PD_CER] = { .name = "pd_cer", .type = BLOBMSG_TYPE_STRING },
[IFACE_ATTR_RA_DEFAULT] = { .name = "ra_default", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_RA_MANAGEMENT] = { .name = "ra_management", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_RA_OFFLINK] = { .name = "ra_offlink", .type = BLOBMSG_TYPE_BOOL },
@@ -473,6 +477,14 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr
goto err;
}
+ if ((c = tb[IFACE_ATTR_PD_MANAGER]))
+ strncpy(iface->dhcpv6_pd_manager, blobmsg_get_string(c),
+ sizeof(iface->dhcpv6_pd_manager) - 1);
+
+ if ((c = tb[IFACE_ATTR_PD_CER]) &&
+ inet_pton(AF_INET6, blobmsg_get_string(c), &iface->dhcpv6_pd_cer) < 1)
+ goto err;
+
if ((c = tb[IFACE_ATTR_NDPROXY_ROUTING]))
iface->learn_routes = blobmsg_get_bool(c);
else if (overwrite)