Update to FreeBSD head 2019-09-24

Git mirror commit 6b0307a0a5184339393f555d5d424190d8a8277a.
This commit is contained in:
Sebastian Huber
2019-09-24 11:05:03 +02:00
parent 83afe13399
commit a5ddb0ea69
903 changed files with 39332 additions and 17958 deletions

View File

@@ -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