summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-10-16 17:12:26 +0200
committerSteven Barth <steven@midlink.org>2014-10-16 17:12:26 +0200
commitf13c624c16a8e3fd30bb47f9ed614c7e2bd6d75e (patch)
treef36c7b5b19d03b67f7845ba2206447ba2837ab27 /src/config.c
parent58461b29bb2fbac41775a67ba317497edcdbbf90 (diff)
downloadodhcpd-f13c624c16a8e3fd30bb47f9ed614c7e2bd6d75e.tar.gz
router: add support for router address
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 2c0bc90..dc1dcdc 100644
--- a/src/config.c
+++ b/src/config.c
@@ -39,6 +39,7 @@ enum {
IFACE_ATTR_RA_MANAGEMENT,
IFACE_ATTR_RA_OFFLINK,
IFACE_ATTR_RA_PREFERENCE,
+ IFACE_ATTR_RA_ADVROUTER,
IFACE_ATTR_PD_MANAGER,
IFACE_ATTR_PD_CER,
IFACE_ATTR_NDPROXY_ROUTING,
@@ -73,6 +74,7 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = {
[IFACE_ATTR_RA_MANAGEMENT] = { .name = "ra_management", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_RA_OFFLINK] = { .name = "ra_offlink", .type = BLOBMSG_TYPE_BOOL },
[IFACE_ATTR_RA_PREFERENCE] = { .name = "ra_preference", .type = BLOBMSG_TYPE_STRING },
+ [IFACE_ATTR_RA_ADVROUTER] = { .name = "ra_advrouter", .type = BLOBMSG_TYPE_BOOL },
[IFACE_ATTR_NDPROXY_ROUTING] = { .name = "ndproxy_routing", .type = BLOBMSG_TYPE_BOOL },
[IFACE_ATTR_NDPROXY_SLAVE] = { .name = "ndproxy_slave", .type = BLOBMSG_TYPE_BOOL },
[IFACE_ATTR_NDPROXY_STATIC] = { .name = "ndproxy_static", .type = BLOBMSG_TYPE_ARRAY },
@@ -514,6 +516,9 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr
if ((c = tb[IFACE_ATTR_RA_OFFLINK]))
iface->ra_not_onlink = blobmsg_get_bool(c);
+ if ((c = tb[IFACE_ATTR_RA_ADVROUTER]))
+ iface->ra_advrouter = blobmsg_get_bool(c);
+
if ((c = tb[IFACE_ATTR_RA_PREFERENCE])) {
const char *prio = blobmsg_get_string(c);