return -1;
strncpy(iface->name, name, sizeof(iface->name) - 1);
+
+ /* Default settings */
+ iface->managed = 1;
+ iface->learn_routes = true;
+
list_add(&iface->head, &interfaces);
overwrite = true;
}
if ((c = tb[IFACE_ATTR_RA_MANAGEMENT]))
iface->managed = blobmsg_get_u32(c);
- else if (overwrite)
- iface->managed = 1;
if ((c = tb[IFACE_ATTR_RA_OFFLINK]))
iface->ra_not_onlink = blobmsg_get_bool(c);
if ((c = tb[IFACE_ATTR_NDPROXY_ROUTING]))
iface->learn_routes = blobmsg_get_bool(c);
- else if (overwrite)
- iface->learn_routes = true;
if ((c = tb[IFACE_ATTR_NDPROXY_SLAVE]))
iface->external = blobmsg_get_bool(c);