hyperv/hn: Don't allow MTU change, if it is not supported by the NVS.
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7923
This commit is contained in:
parent
ae75f7ee26
commit
6be919751f
@ -1572,6 +1572,13 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
|
||||
HN_LOCK(sc);
|
||||
|
||||
if ((sc->hn_caps & HN_CAP_MTU) == 0) {
|
||||
/* Can't change MTU */
|
||||
HN_UNLOCK(sc);
|
||||
error = EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ifp->if_mtu == ifr->ifr_mtu) {
|
||||
HN_UNLOCK(sc);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user