mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 02:24:35 +08:00
Check valid netmask changes.
This commit is contained in:
parent
588dc4c044
commit
86189d8e21
8
ipv4.c
8
ipv4.c
@ -1293,9 +1293,11 @@ ipv4_handleifa(struct dhcpcd_ctx *ctx,
|
||||
TAILQ_INSERT_TAIL(&state->addrs, ia, next);
|
||||
}
|
||||
/* Mask could have changed */
|
||||
ia->mask = *mask;
|
||||
snprintf(ia->saddr, sizeof(ia->saddr), "%s/%d",
|
||||
inet_ntoa(*addr), inet_ntocidr(*mask));
|
||||
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