diff options
author | jkim <jkim@FreeBSD.org> | 2006-12-19 22:50:49 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2006-12-19 22:50:49 +0000 |
commit | 7d753263657935de0956959307f7859f6f2e8575 (patch) | |
tree | 8f73aa477048267afee6174d985631ba7e681c77 /sbin | |
parent | 37965664cc660bfa55325be6ad0fbe49b50a7c4a (diff) | |
download | FreeBSD-src-7d753263657935de0956959307f7859f6f2e8575.zip FreeBSD-src-7d753263657935de0956959307f7859f6f2e8575.tar.gz |
Clear full-duplex when half-duplex flag is set. This actually makes
'mediaopt half-duplex' working as it should. It is now equivalent of
'-mediaopt full-duplex'.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifmedia.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifmedia.c b/sbin/ifconfig/ifmedia.c index 398f1b7..c768895 100644 --- a/sbin/ifconfig/ifmedia.c +++ b/sbin/ifconfig/ifmedia.c @@ -303,9 +303,13 @@ domediaopt(const char *val, int clear, int s) ifr.ifr_media = ifmr->ifm_current; if (clear) ifr.ifr_media &= ~options; - else + else { + if (options & IFM_HDX) { + ifr.ifr_media &= ~IFM_FDX; + options &= ~IFM_HDX; + } ifr.ifr_media |= options; - + } ifmr->ifm_current = ifr.ifr_media; callback_register(setifmediacallback, (void *)ifmr); } |