summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2005-05-27 04:52:24 +0000
committerbrad <brad@openbsd.org>2005-05-27 04:52:24 +0000
commita21fc6f98877b150a8edcb09878bd8c69e656974 (patch)
tree0a1a23bcec3ce404bedca11cbbaa3e8e5cadd608
parentFix a access after free on shutdown. OK norby@ (diff)
downloadwireguard-openbsd-a21fc6f98877b150a8edcb09878bd8c69e656974.tar.xz
wireguard-openbsd-a21fc6f98877b150a8edcb09878bd8c69e656974.zip
handle SIOCSIFMTU ioctl
-rw-r--r--sys/dev/pci/if_sis.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index 3a5853cafac..5aef79b7e72 100644
--- a/sys/dev/pci/if_sis.c
+++ b/sys/dev/pci/if_sis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sis.c,v 1.45 2005/05/22 05:40:52 brad Exp $ */
+/* $OpenBSD: if_sis.c,v 1.46 2005/05/27 04:52:24 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1968,6 +1968,12 @@ int sis_ioctl(ifp, command, data)
}
error = 0;
break;
+ case SIOCSIFMTU:
+ if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU)
+ error = EINVAL;
+ else if (ifp->if_mtu != ifr->ifr_mtu)
+ ifp->if_mtu = ifr->ifr_mtu;
+ break;
case SIOCADDMULTI:
case SIOCDELMULTI:
error = (command == SIOCADDMULTI) ?