const struct dhcp_message *dhcp;
uint16_t mtu;
+ if (ifp->options->mtu)
+ return (uint16_t)ifp->options->mtu;
mtu = 0; /* bogus gcc warning */
if ((dhcp = D_CSTATE(ifp)->new) == NULL ||
has_option_mask(ifp->options->nomask, DHO_MTU) ||
return -1;
}
TAILQ_INSERT_TAIL(ifo->routes, rt, next);
+ } else if (strncmp(arg, "interface_mtu=",
+ strlen("interface_mtu=")) == 0 ||
+ strncmp(arg, "mtu=", strlen("mtu=")) == 0)
+ {
+ ifo->mtu = (unsigned int)strtou(p, NULL, 0,
+ MTU_MIN, MTU_MAX, &e);
+ if (e) {
+ logger(ctx, LOG_ERR, "invalid MTU %s", p);
+ return -1;
+ }
} else {
dl = 0;
if (ifo->config != NULL) {