Date: Sat, 13 Nov 2010 22:40:37 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215272 - head/sbin/ifconfig Message-ID: <201011132240.oADMebRk062450@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Sat Nov 13 22:40:37 2010 New Revision: 215272 URL: http://svn.freebsd.org/changeset/base/215272 Log: 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 Modified: head/sbin/ifconfig/ifmedia.c Modified: head/sbin/ifconfig/ifmedia.c ============================================================================== --- head/sbin/ifconfig/ifmedia.c Sat Nov 13 22:38:33 2010 (r215271) +++ head/sbin/ifconfig/ifmedia.c Sat Nov 13 22:40:37 2010 (r215272) @@ -276,7 +276,7 @@ setmedia(const char *val, int d, int s, 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011132240.oADMebRk062450>