diff options
author | marius <marius@FreeBSD.org> | 2010-11-13 22:40:37 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-11-13 22:40:37 +0000 |
commit | 6011bea49b131d3d52a0854f271d6a0ce475512e (patch) | |
tree | b69ecff5f87e0623d597d6cbd826b68b1cf141fd /sbin | |
parent | 554a219f6e33e99132ea4930345cbbfc64574425 (diff) | |
download | FreeBSD-src-6011bea49b131d3d52a0854f271d6a0ce475512e.zip FreeBSD-src-6011bea49b131d3d52a0854f271d6a0ce475512e.tar.gz |
When setting a media with no sub-type specified also reset the type
specific options along with the global ones so these options don't
stick when f.e. switching to IFM_AUTO.
MFC after: 2 weeks
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifmedia.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifmedia.c b/sbin/ifconfig/ifmedia.c index b805756..889c54a 100644 --- a/sbin/ifconfig/ifmedia.c +++ b/sbin/ifconfig/ifmedia.c @@ -276,7 +276,7 @@ setmedia(const char *val, int d, int s, const struct afswtch *afp) IFM_TYPE(ifmr->ifm_ulist[0]) | subtype; if ((ifr.ifr_media & IFM_TMASK) == 0) { - ifr.ifr_media &= ~IFM_GMASK; + ifr.ifr_media &= ~(IFM_GMASK | IFM_OMASK); } ifmr->ifm_current = ifr.ifr_media; |