projects
/
project
/
odhcpd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix ra_management and ndproxy_routing config overwrite
[project/odhcpd.git]
/
src
/
config.c
diff --git
a/src/config.c
b/src/config.c
index
05eb824
..
cac2d09
100644
(file)
--- a/
src/config.c
+++ b/
src/config.c
@@
-454,7
+454,7
@@
int config_parse_interface(void *data, size_t len, const char *name, bool overwr
if ((c = tb[IFACE_ATTR_RA_MANAGEMENT]))
iface->managed = blobmsg_get_u32(c);
if ((c = tb[IFACE_ATTR_RA_MANAGEMENT]))
iface->managed = blobmsg_get_u32(c);
- else
+ else
if (overwrite)
iface->managed = 1;
if ((c = tb[IFACE_ATTR_RA_OFFLINK]))
iface->managed = 1;
if ((c = tb[IFACE_ATTR_RA_OFFLINK]))
@@
-475,7
+475,7
@@
int config_parse_interface(void *data, size_t len, const char *name, bool overwr
if ((c = tb[IFACE_ATTR_NDPROXY_ROUTING]))
iface->learn_routes = blobmsg_get_bool(c);
if ((c = tb[IFACE_ATTR_NDPROXY_ROUTING]))
iface->learn_routes = blobmsg_get_bool(c);
- else
+ else
if (overwrite)
iface->learn_routes = true;
if ((c = tb[IFACE_ATTR_NDPROXY_SLAVE]))
iface->learn_routes = true;
if ((c = tb[IFACE_ATTR_NDPROXY_SLAVE]))
@@
-517,8
+517,8
@@
static int set_interface(struct uci_section *s)
void odhcpd_reload(void)
{
struct uci_context *uci = uci_alloc_context();
void odhcpd_reload(void)
{
struct uci_context *uci = uci_alloc_context();
- struct lease *l;
- list_for_each_entry(l, &leases, head) {
+ while (!list_empty(&leases)) {
+ struct lease *l = list_first_entry(&leases, struct lease, head);
list_del(&l->head);
free(l->duid);
free(l);
list_del(&l->head);
free(l->duid);
free(l);