Skip to content

Commit d25c026

Browse files
committed
IPv4: Ignore DHCP state when building routes
As this will change periodically. We only care if the state (address) has been added. Fixes #440 thanks to JognSmit.
1 parent 9c48f4c commit d25c026

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ipv4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ inet_dhcproutes(rb_tree_t *routes, struct interface *ifp, bool *have_default)
291291
int n;
292292

293293
state = D_CSTATE(ifp);
294-
if (state == NULL || state->state != DHS_BOUND || !state->added)
294+
if (state == NULL || !(state->added & STATE_ADDED))
295295
return 0;
296296

297297
/* An address does have to exist. */

0 commit comments

Comments
 (0)