Author: sephe Date: Mon Sep 19 07:32:08 2016 New Revision: 305965 URL: https://svnweb.freebsd.org/changeset/base/305965
Log: 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 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:17:43 2016 (r305964) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:32:08 2016 (r305965) @@ -1572,6 +1572,13 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, 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; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"