mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-12-03 23:14:25 +08:00
Check valid netmask changes.
This commit is contained in:
parent
588dc4c044
commit
86189d8e21
2
ipv4.c
2
ipv4.c
@ -1293,9 +1293,11 @@ ipv4_handleifa(struct dhcpcd_ctx *ctx,
|
||||
TAILQ_INSERT_TAIL(&state->addrs, ia, next);
|
||||
}
|
||||
/* Mask could have changed */
|
||||
if (mask->s_addr != INADDR_ANY) {
|
||||
ia->mask = *mask;
|
||||
snprintf(ia->saddr, sizeof(ia->saddr), "%s/%d",
|
||||
inet_ntoa(*addr), inet_ntocidr(*mask));
|
||||
}
|
||||
if (brd != NULL)
|
||||
ia->brd = *brd;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user