svn commit: r227324 - head/sys/dev/ti

Pyun YongHyeon yongari at FreeBSD.org
Mon Nov 7 22:58:50 UTC 2011


Author: yongari
Date: Mon Nov  7 22:58:49 2011
New Revision: 227324
URL: http://svn.freebsd.org/changeset/base/227324

Log:
  Do not allow changing MTU to be less than the minimum.

Modified:
  head/sys/dev/ti/if_ti.c

Modified: head/sys/dev/ti/if_ti.c
==============================================================================
--- head/sys/dev/ti/if_ti.c	Mon Nov  7 22:53:06 2011	(r227323)
+++ head/sys/dev/ti/if_ti.c	Mon Nov  7 22:58:49 2011	(r227324)
@@ -3396,7 +3396,7 @@ ti_ioctl(struct ifnet *ifp, u_long comma
 	switch (command) {
 	case SIOCSIFMTU:
 		TI_LOCK(sc);
-		if (ifr->ifr_mtu > TI_JUMBO_MTU)
+		if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > TI_JUMBO_MTU)
 			error = EINVAL;
 		else {
 			ifp->if_mtu = ifr->ifr_mtu;


More information about the svn-src-head mailing list