Date: Thu, 22 Jun 2017 06:24:09 +0000 From: =?iso-8859-1?Q?M=26S_-_Krasznai_Andr=E1s?= <Krasznai.Andras@mands.hu> To: Cy Schubert <Cy.Schubert@komquats.com>, Sean Bruno <sbruno@freebsd.org> Cc: Renato Botelho <garga@FreeBSD.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: RE: Failover Mode Between Ethernet and Wireless Interfaces broken on >= 11 Message-ID: <9c0081fbaf234585931a7aba4b477dfe@MSEXCH13.mands.hu> In-Reply-To: <201706220540.v5M5e4FF038058@slippy.cwsent.com> References: Message from Sean Bruno <sbruno@freebsd.org> of "Wed, 21 Jun 2017 13:26:58 -0600." <cbdb0928-1355-0d1e-7f9c-69fb5edde09d@freebsd.org> <201706220540.v5M5e4FF038058@slippy.cwsent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Good morning! With em0 and iwn I have the same working configuration for failover between= wireless interface and ethernet adapter. I run FreeBSD-12.=20 There was some change introduced with FreeBSD-11 in the syntax how to speci= fy the mac address for the wireless interface (old - FreeBSD-10 working fo= rm: ifconfig_iwn0=3D"ether <new mac address>", the new is=20 create_args_wlan0=3D"wlanaddr <new mac address>". The "new" mac address is = identical with the ethernet adapter's mac address.=20 best regards Andr=E1s Krasznai -----Eredeti =FCzenet----- Felad=F3: owner-freebsd-current@freebsd.org [mailto:owner-freebsd-current@f= reebsd.org] Meghatalmaz=F3 Cy Schubert K=FCldve: 2017. j=FAnius 22. 7:40 C=EDmzett: Sean Bruno M=E1solatot kap: Renato Botelho; freebsd-current@freebsd.org T=E1rgy: Re: Failover Mode Between Ethernet and Wireless Interfaces broken = on >=3D 11 In message <cbdb0928-1355-0d1e-7f9c-69fb5edde09d@freebsd.org>, Sean Bruno w= rite s: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156)=20 > --XuprkQPPD5E0VHaDeuAKBatHWCR01xNcA > Content-Type: multipart/mixed;=20 > boundary=3D"fPqiMVoTg6hr4JdbiP1DBOlOppEsSDgjw"; > protected-headers=3D"v1" > From: Sean Bruno <sbruno@freebsd.org> > To: Renato Botelho <garga@FreeBSD.org>, freebsd-current@freebsd.org > Message-ID: <cbdb0928-1355-0d1e-7f9c-69fb5edde09d@freebsd.org> > Subject: Re: Failover Mode Between Ethernet and Wireless Interfaces=20 > broken on >=3D 11 > References: <1c1e5c6f-35e5-ca14-2e23-5e33d86a5266@FreeBSD.org> > In-Reply-To: <1c1e5c6f-35e5-ca14-2e23-5e33d86a5266@FreeBSD.org> >=20 > --fPqiMVoTg6hr4JdbiP1DBOlOppEsSDgjw > Content-Type: text/plain; charset=3Dutf-8 > Content-Language: en-US > Content-Transfer-Encoding: quoted-printable >=20 >=20 >=20 > On 06/21/17 11:48, Renato Botelho wrote: > > I've already sent it to net, but I suspect this is the appropriate=20 > > plac=3D > e > > to discuss this subject. > >=3D20 > > Last night I was configuring a new laptop and decided to give it [1]=20 > >a try. I figured out this section of handbook (similar instructions=20 > >are o=3D > n > > lagg(4) manpage) is outdated, based on FreeBSD 10.x. > >=3D20 > > Then I modified a bit the commands and tried to get it configured on =20 > >12-CURRENT, without success. I spoke with adrian@, who told me this =20 > >setup doesn't work on FreeBSD > 10, because on newer versions=20 > >Wireless interfaces mac address cannot be changed. > >=3D20 > > My next attempt was to do the other way round and make lagg to use=20 > >wlan=3D > 0 > > mac address instead of em0's. but even doing this my wireless=20 > > interface=3D >=20 > > ended up not working. > >=3D20 > > After further investigation I noted that a simple command: > >=3D20 > > # ifconfig wlan0 ether $wlan0_current_mac_address > >=3D20 > > is enough to break it on 12-CURRENT. > >=3D20 > > I've checked if_setlladdr() source code and noted it always replace=20 > >the=3D >=20 > > mac address, even if the same is already configured on the=20 > > interface. I=3D > s > > it the expected behavior? > >=3D20 > > Just as a PoC I've applied the following patch to if_setlladdr(): > >=3D20 > > Index: sys/net/if.c > >=20 > >=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D > >=3D3D=3D > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D= 3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D > 3D=3D3D=3D =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D > > --- sys/net/if.c (revision 320097) > > +++ sys/net/if.c (working copy) > > @@ -3519,6 +3519,10 @@ > > ifa_free(ifa); > > return (EINVAL); > > } > > + if (memcmp(lladdr, LLADDR(sdl), len) =3D3D=3D3D 0) { > > + ifa_free(ifa); > > + return (0); > > + } > > switch (ifp->if_type) { > > case IFT_ETHER: > > case IFT_FDDI: > >=3D20 > > And configured it to use wlan0 mac address on rc.conf: > >=3D20 > > ifconfig_em0=3D3D"ether 60:67:20:c5:2d:48 up" > > wlans_iwn0=3D3D"wlan0" > > ifconfig_wlan0=3D3D"WPA" > > cloned_interfaces=3D3D"lagg0" > > ifconfig_lagg0=3D3D"up laggproto failover laggport em0 laggport wlan0=20 > >DHC=3D > P" > >=3D20 > > and it's now working as expected. > >=3D20 > > Other than that, I believe if wlan interfaces cannot have their mac =20 > >address changed, ifconfig should return an error when user attempts=20 > >to do it, and if_setlladdr() should do the same. > >=3D20 > > Thoughts? > >=3D20 > > [1] > >=20 > >https://www.freebsd.org/doc/handbook/network-aggregation.html#network > >in=3D > g-lagg-wired-and-wireless > >=3D20 >=20 >=20 > Maybe this is a "iflib" problem. em(4) and igb(4) are pretty=20 > different now in head. Can you shove it into bugzilla with a test=20 > case (copy/paste your email) and tag me on it? As a late comer to this thread, I don't have any issues either. I too have = a bge interface and iwn set up as follows: ifconfig_lagg0=3D"laggproto failover laggport bge0 laggport wlan0 DHCP" -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. _______________________________________________ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/= listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9c0081fbaf234585931a7aba4b477dfe>