diff options
author | 2005-04-02 03:20:26 +0000 | |
---|---|---|
committer | 2005-04-02 03:20:26 +0000 | |
commit | d2964ffecbca51e9016eeab7ab44d3fc2aa4c529 (patch) | |
tree | eeea5394881be88fba6484c7e7218172a1b4f4f1 /sys/dev/isa/if_ex.c | |
parent | find cachesize for amd cpus too. ok deraadt tom (diff) | |
download | wireguard-openbsd-d2964ffecbca51e9016eeab7ab44d3fc2aa4c529.tar.xz wireguard-openbsd-d2964ffecbca51e9016eeab7ab44d3fc2aa4c529.zip |
support setting the MTU
Diffstat (limited to 'sys/dev/isa/if_ex.c')
-rw-r--r-- | sys/dev/isa/if_ex.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c index e0dd38e58ff..b2c9cc692b3 100644 --- a/sys/dev/isa/if_ex.c +++ b/sys/dev/isa/if_ex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ex.c,v 1.10 2004/12/26 21:22:13 miod Exp $ */ +/* $OpenBSD: if_ex.c,v 1.11 2005/04/02 03:20:26 brad Exp $ */ /* * Copyright (c) 1997, Donald A. Schmidt * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es) @@ -874,15 +874,14 @@ ex_ioctl(ifp, cmd, data) bcopy((caddr_t) sc->sc_addr, (caddr_t) &ifr->ifr_data, sizeof(sc->sc_addr)); break; #endif -#if 0 /* XXX can we do this? */ case SIOCSIFMTU: DODEBUG(Start_End, printf("SIOCSIFMTU");); - if (ifr->if_mtu > ETHERMTU) + if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) { error = EINVAL; - else + } else if (ifp->if_mtu != ifr->ifr_mtu) { ifp->if_mtu = ifr->ifr_mtu; + } break; -#endif case SIOCADDMULTI: DODEBUG(Start_End, printf("SIOCADDMULTI");); case SIOCDELMULTI: |