mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 13:08:35 +08:00
Update to FreeBSD head 2019-09-24
Git mirror commit 6b0307a0a5184339393f555d5d424190d8a8277a.
This commit is contained in:
@@ -865,6 +865,7 @@ bind_lease(struct interface_info *ip)
|
||||
opt = &ip->client->new->options[DHO_INTERFACE_MTU];
|
||||
if (opt->len == sizeof(u_int16_t)) {
|
||||
u_int16_t mtu = 0;
|
||||
u_int16_t old_mtu = 0;
|
||||
bool supersede = (ip->client->config->default_actions[DHO_INTERFACE_MTU] ==
|
||||
ACTION_SUPERSEDE);
|
||||
|
||||
@@ -873,12 +874,19 @@ bind_lease(struct interface_info *ip)
|
||||
else
|
||||
mtu = be16dec(opt->data);
|
||||
|
||||
if (ip->client->active) {
|
||||
opt = &ip->client->active->options[DHO_INTERFACE_MTU];
|
||||
if (opt->len == sizeof(u_int16_t)) {
|
||||
old_mtu = be16dec(opt->data);
|
||||
}
|
||||
}
|
||||
|
||||
if (mtu < MIN_MTU) {
|
||||
/* Treat 0 like a user intentionally doesn't want to change MTU and,
|
||||
* therefore, warning is not needed */
|
||||
if (!supersede || mtu != 0)
|
||||
warning("mtu size %u < %d: ignored", (unsigned)mtu, MIN_MTU);
|
||||
} else {
|
||||
} else if (ip->client->state != S_RENEWING || mtu != old_mtu) {
|
||||
interface_set_mtu_unpriv(privfd, mtu);
|
||||
}
|
||||
}
|
||||
@@ -2350,7 +2358,8 @@ priv_script_go(void)
|
||||
if (ip)
|
||||
script_flush_env(ip->client);
|
||||
|
||||
return (wstatus & 0xff);
|
||||
return (WIFEXITED(wstatus) ?
|
||||
WEXITSTATUS(wstatus) : 128 + WTERMSIG(wstatus));
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user