diff options
| author | 2012-07-25 18:18:59 +0000 | |
|---|---|---|
| committer | 2012-07-25 18:18:59 +0000 | |
| commit | 8ee6d84e48f43b73c092fc8894a4427d013e152e (patch) | |
| tree | 0dbad75a053ea8650b827caf19d10a0311c47560 /sys/arch/sparc | |
| parent | decls before code (diff) | |
| download | wireguard-openbsd-8ee6d84e48f43b73c092fc8894a4427d013e152e.tar.xz wireguard-openbsd-8ee6d84e48f43b73c092fc8894a4427d013e152e.zip | |
When reporting media state, be sure to set IFM_AVALID and IFM_ACTIVE in
ifm_status, for dhclient's sake. Current dhclient interface_status()
considers interfaces able to report media information but not returning
IFM_AVALID as down. Note that these interfaces usually have mii(4) or
have specific code reporting correct values; sparc le(4) is an exception.
Found the hard way by sebastia@; joint work with krw@, ok deraadt@
Diffstat (limited to 'sys/arch/sparc')
| -rw-r--r-- | sys/arch/sparc/dev/if_le.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/sparc/dev/if_le.c b/sys/arch/sparc/dev/if_le.c index 0a8b22f562f..c01e21d58e1 100644 --- a/sys/arch/sparc/dev/if_le.c +++ b/sys/arch/sparc/dev/if_le.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le.c,v 1.31 2010/07/10 19:32:24 miod Exp $ */ +/* $OpenBSD: if_le.c,v 1.32 2012/07/25 18:18:59 miod Exp $ */ /* $NetBSD: if_le.c,v 1.50 1997/09/09 20:54:48 pk Exp $ */ /*- @@ -278,6 +278,8 @@ lemediastatus(ifp, ifmr) struct am7990_softc *sc = ifp->if_softc; struct le_softc *lesc = (struct le_softc *)sc; + ifmr->ifm_status = IFM_AVALID | IFM_ACTIVE; + if (lesc->sc_dma == NULL) { if (lesc->sc_lebufchild) ifmr->ifm_active = IFM_ETHER | IFM_10_T; @@ -298,6 +300,7 @@ lemediastatus(ifp, ifmr) else ifmr->ifm_active = IFM_ETHER | IFM_10_5; #else + ifmr->ifm_status = IFM_AVALID | IFM_ACTIVE; ifmr->ifm_active = IFM_ETHER | IFM_10_5; #endif } |
