diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-02-07 16:04:02 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-02-07 16:04:02 +0000 |
commit | 2d2c863ec3800982d763f304839acadd599c9143 (patch) | |
tree | ce6ece35f8aad808f3d20c8702e4e8bdf6983a0e | |
parent | ca6d5e0247fa0b79a2d7dee4c474b0e0a1a921df (diff) |
Add the SIOCSIFMTU ioctl to allow ioctl changes;
ok brad@ (w/ comments), reyk@
-rw-r--r-- | sys/dev/pci/if_vr.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) ? |