From owner-freebsd-current@freebsd.org Thu Jun 22 05:41:23 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADC16DA693A for ; Thu, 22 Jun 2017 05:41:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D9666E254; Thu, 22 Jun 2017 05:41:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id Nurnde9Tfyd2DNurodd6Km; Wed, 21 Jun 2017 23:41:21 -0600 X-Authority-Analysis: v=2.2 cv=F5wnTupN c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=LWSFodeU3zMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=RDIeyIpEMCzLZ1edNqcA:9 a=ZDUZ1yghKV7gKz2Z:21 a=qT8NLVTgBOpUwekS:21 a=CjuIK1q_8ugA:10 a=D8VtyeFL2l4A:10 a=_v90dqXTzXcA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id A100C101; Wed, 21 Jun 2017 22:41:19 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v5M5e4FF038058; Wed, 21 Jun 2017 22:40:04 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201706220540.v5M5e4FF038058@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Sean Bruno cc: Renato Botelho , freebsd-current@freebsd.org Subject: Re: Failover Mode Between Ethernet and Wireless Interfaces broken on >= 11 In-Reply-To: Message from Sean Bruno of "Wed, 21 Jun 2017 13:26:58 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 21 Jun 2017 22:40:04 -0700 X-CMAE-Envelope: MS4wfAgpZSmG64aSWIRyXb60exsGjM8w9XP75C3XEE5BXWBveNigX9C2FrpqhCNDY0w9AoTvPEXcAb0j5DVHK1OiYNfavY/AtEeBlk++/FSTPt4ZpmON0LxU +2BdPCPXVmLR914n7Rp2zSp0GhaSMg09atZ2pHeaJJiTAGyI4SztiSMHwAxlaWkM2I5Th4nZd+vdfDkYI6V9aaTJKezRzXvmrK2jok/FDTOvI4s5U3wfI5by UGFhCGQPOnkRa+/hwVR+PQ== X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:41:23 -0000 In message , Sean Bruno write s: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --XuprkQPPD5E0VHaDeuAKBatHWCR01xNcA > Content-Type: multipart/mixed; boundary="fPqiMVoTg6hr4JdbiP1DBOlOppEsSDgjw"; > protected-headers="v1" > From: Sean Bruno > To: Renato Botelho , freebsd-current@freebsd.org > Message-ID: > Subject: Re: Failover Mode Between Ethernet and Wireless Interfaces broken on > >= 11 > References: <1c1e5c6f-35e5-ca14-2e23-5e33d86a5266@FreeBSD.org> > In-Reply-To: <1c1e5c6f-35e5-ca14-2e23-5e33d86a5266@FreeBSD.org> > > --fPqiMVoTg6hr4JdbiP1DBOlOppEsSDgjw > Content-Type: text/plain; charset=utf-8 > Content-Language: en-US > Content-Transfer-Encoding: quoted-printable > > > > On 06/21/17 11:48, Renato Botelho wrote: > > I've already sent it to net, but I suspect this is the appropriate plac= > e > > to discuss this subject. > >=20 > > Last night I was configuring a new laptop and decided to give it [1] a > > try. I figured out this section of handbook (similar instructions are o= > n > > lagg(4) manpage) is outdated, based on FreeBSD 10.x. > >=20 > > Then I modified a bit the commands and tried to get it configured on > > 12-CURRENT, without success. I spoke with adrian@, who told me this > > setup doesn't work on FreeBSD > 10, because on newer versions Wireless > > interfaces mac address cannot be changed. > >=20 > > My next attempt was to do the other way round and make lagg to use wlan= > 0 > > mac address instead of em0's. but even doing this my wireless interface= > > > ended up not working. > >=20 > > After further investigation I noted that a simple command: > >=20 > > # ifconfig wlan0 ether $wlan0_current_mac_address > >=20 > > is enough to break it on 12-CURRENT. > >=20 > > I've checked if_setlladdr() source code and noted it always replace the= > > > mac address, even if the same is already configured on the interface. I= > s > > it the expected behavior? > >=20 > > Just as a PoC I've applied the following patch to if_setlladdr(): > >=20 > > Index: sys/net/if.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- 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) =3D=3D 0) { > > + ifa_free(ifa); > > + return (0); > > + } > > switch (ifp->if_type) { > > case IFT_ETHER: > > case IFT_FDDI: > >=20 > > And configured it to use wlan0 mac address on rc.conf: > >=20 > > ifconfig_em0=3D"ether 60:67:20:c5:2d:48 up" > > wlans_iwn0=3D"wlan0" > > ifconfig_wlan0=3D"WPA" > > cloned_interfaces=3D"lagg0" > > ifconfig_lagg0=3D"up laggproto failover laggport em0 laggport wlan0 DHC= > P" > >=20 > > and it's now working as expected. > >=20 > > Other than that, I believe if wlan interfaces cannot have their mac > > address changed, ifconfig should return an error when user attempts to > > do it, and if_setlladdr() should do the same. > >=20 > > Thoughts? > >=20 > > [1] > > https://www.freebsd.org/doc/handbook/network-aggregation.html#networkin= > g-lagg-wired-and-wireless > >=20 > > > Maybe this is a "iflib" problem. em(4) and igb(4) are pretty different > now in head. Can you shove it into bugzilla with a test 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="laggproto failover laggport bge0 laggport wlan0 DHCP" -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.