From 2d2c863ec3800982d763f304839acadd599c9143 Mon Sep 17 00:00:00 2001 From: "Thordur I. Bjornsson" Date: Thu, 7 Feb 2008 16:04:02 +0000 Subject: Add the SIOCSIFMTU ioctl to allow ioctl changes; ok brad@ (w/ comments), reyk@ --- sys/dev/pci/if_vr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 8c3a184f238..2834cbf3eb8 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.71 2007/11/26 09:28:33 martynas Exp $ */ +/* $OpenBSD: if_vr.c,v 1.72 2008/02/07 16:04:01 thib Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1396,6 +1396,12 @@ vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data) } sc->sc_if_flags = ifp->if_flags; break; + case SIOCSIFMTU: + if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu) + error = EINVAL; + else + ifp->if_mtu = ifr->ifr_mtu; + break; case SIOCADDMULTI: case SIOCDELMULTI: error = (command == SIOCADDMULTI) ? -- cgit v1.2.3