summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c2
-rw-r--r--src/dhcpv6-ia.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c
index b6b3708..d025bdf 100644
--- a/src/config.c
+++ b/src/config.c
@@ -560,7 +560,7 @@ void odhcpd_reload(void)
enum odhcpd_mode hybrid_mode = RELAYD_DISABLED;
#ifdef WITH_UBUS
- if (ubus_has_prefix(i->name, i->ifname))
+ if (!ubus_has_prefix(i->name, i->ifname))
hybrid_mode = RELAYD_RELAY;
#endif
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index 2e93bd0..88840a4 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -211,7 +211,7 @@ void dhcpv6_write_statefile(void)
if (iface->dhcpv6 != RELAYD_SERVER && iface->dhcpv4 != RELAYD_SERVER)
continue;
- if (iface->dhcpv6 == RELAYD_SERVER) {
+ if (iface->dhcpv6 == RELAYD_SERVER && iface->ia_assignments.next) {
struct dhcpv6_assignment *c;
list_for_each_entry(c, &iface->ia_assignments, head) {
if (c->clid_len == 0)
@@ -262,7 +262,7 @@ void dhcpv6_write_statefile(void)
}
}
- if (iface->dhcpv4 == RELAYD_SERVER) {
+ if (iface->dhcpv4 == RELAYD_SERVER && iface->dhcpv4_assignments.next) {
struct dhcpv4_assignment *c;
list_for_each_entry(c, &iface->dhcpv4_assignments, head) {
char ipbuf[INET6_ADDRSTRLEN];