Make it possible to set a larger MTU by attempting to set MTUs on all
trunk ports first. If that succeeds, and we're inside our own bounds, so be it. Still not ideal -- adding a port after changing an MTU doesn't change port's MTU, but a step in the right direction. PR: kern/95417 Submitted by: Vladimir Ivanov <wawa AT yandex-team DOT ru> MFC after: 3 days I've slightly edited a patch to make the conditional logic positive and remove (what I think was) a redundant ng_fec_init() call.
This commit is contained in:
parent
3d82b87057
commit
7f01dc25c4
@ -694,10 +694,28 @@ ng_fec_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
/* These two are mostly handled at a higher layer */
|
||||
case SIOCSIFADDR:
|
||||
case SIOCGIFADDR:
|
||||
case SIOCSIFMTU:
|
||||
error = ether_ioctl(ifp, command, data);
|
||||
break;
|
||||
|
||||
case SIOCSIFMTU:
|
||||
if (ifr->ifr_mtu >= NG_FEC_MTU_MIN &&
|
||||
ifr->ifr_mtu <= NG_FEC_MTU_MAX) {
|
||||
struct ng_fec_portlist *p;
|
||||
struct ifnet *bifp;
|
||||
|
||||
TAILQ_FOREACH(p, &b->ng_fec_ports, fec_list) {
|
||||
bifp = p->fec_if;
|
||||
error = (*bifp->if_ioctl)(bifp, SIOCSIFMTU,
|
||||
data);
|
||||
if (error != 0)
|
||||
break;
|
||||
}
|
||||
if (error == 0)
|
||||
ifp->if_mtu = ifr->ifr_mtu;
|
||||
} else
|
||||
error = EINVAL;
|
||||
break;
|
||||
|
||||
/* Set flags */
|
||||
case SIOCSIFFLAGS:
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user