* Re: [PATCH v3 4/5] ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration [not found] ` <20170217155003.4594-5-luiz.dentz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-02-20 22:10 ` Stefan Schmidt 2017-02-21 8:49 ` Luiz Augusto von Dentz 0 siblings, 1 reply; 2+ messages in thread From: Stefan Schmidt @ 2017-02-20 22:10 UTC (permalink / raw) To: Luiz Augusto von Dentz, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA Cc: patrik.flykt-VuQAYsv1563Yd54FQh9/CA, aar-bIcnvbaLZ9MEGnE8C9+IrQ, linux-wpan-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, David S. Miller Hello. [Added netdev in cc as it touches ipv6/addrconf] 6LoWPAN handling changes only so an ACK should be ok and we could carry it through the bluetooth tree after the respin (see below). David, is that ok with you? On 02/17/2017 04:50 PM, Luiz Augusto von Dentz wrote: > From: Alexander Aring <aar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> > > This patch adds support for 48 bit 6LoWPAN address length > autoconfiguration which is the case for BTLE 6LoWPAN. > > Signed-off-by: Alexander Aring <aar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> > Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > --- > net/ipv6/addrconf.c | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index ac9bd56..dede33f 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -2050,12 +2050,19 @@ static void addrconf_leave_anycast(struct inet6_ifaddr *ifp) > __ipv6_dev_ac_dec(ifp->idev, &addr); > } > > -static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev) > +static int addrconf_ifid_6lowpan(u8 *eui, struct net_device *dev) > { > - if (dev->addr_len != EUI64_ADDR_LEN) > + switch (dev->addr_len) { > + case ETH_ALEN: > + return addrconf_ifid_eui48(eui, dev); > + case EUI64_ADDR_LEN: > + memcpy(eui, dev->dev_addr, EUI64_ADDR_LEN); > + eui[0] ^= 2; > + break; > + default: > return -1; > - memcpy(eui, dev->dev_addr, EUI64_ADDR_LEN); > - eui[0] ^= 2; > + } > + > return 0; > } > > @@ -2146,7 +2153,7 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev) > case ARPHRD_IPGRE: > return addrconf_ifid_gre(eui, dev); > case ARPHRD_6LOWPAN: > - return addrconf_ifid_eui64(eui, dev); > + return addrconf_ifid_6lowpan(eui, dev); > case ARPHRD_IEEE1394: > return addrconf_ifid_ieee1394(eui, dev); > case ARPHRD_TUNNEL6: > Against which tree did you make this patch? Seems it needs a rebase. Applying it against bluetooth-next master branch: Applying: ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration error: patch failed: net/ipv6/addrconf.c:2146 error: net/ipv6/addrconf.c: patch does not apply Patch failed at 0001 ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration regards Stefan Schmidt ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3 4/5] ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration 2017-02-20 22:10 ` [PATCH v3 4/5] ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration Stefan Schmidt @ 2017-02-21 8:49 ` Luiz Augusto von Dentz 0 siblings, 0 replies; 2+ messages in thread From: Luiz Augusto von Dentz @ 2017-02-21 8:49 UTC (permalink / raw) To: Stefan Schmidt Cc: linux-bluetooth@vger.kernel.org, Patrik Flykt, Alexander Aring, linux-wpan, open list:NETWORKING [GENERAL], David S. Miller Hi Stefan, On Tue, Feb 21, 2017 at 12:10 AM, Stefan Schmidt <stefan@osg.samsung.com> wrote: > Hello. > > [Added netdev in cc as it touches ipv6/addrconf] > > 6LoWPAN handling changes only so an ACK should be ok and we could carry it > through the bluetooth tree after the respin (see below). > > David, is that ok with you? > > > On 02/17/2017 04:50 PM, Luiz Augusto von Dentz wrote: >> >> From: Alexander Aring <aar@pengutronix.de> >> >> This patch adds support for 48 bit 6LoWPAN address length >> autoconfiguration which is the case for BTLE 6LoWPAN. >> >> Signed-off-by: Alexander Aring <aar@pengutronix.de> >> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> >> --- >> net/ipv6/addrconf.c | 17 ++++++++++++----- >> 1 file changed, 12 insertions(+), 5 deletions(-) >> >> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c >> index ac9bd56..dede33f 100644 >> --- a/net/ipv6/addrconf.c >> +++ b/net/ipv6/addrconf.c >> @@ -2050,12 +2050,19 @@ static void addrconf_leave_anycast(struct >> inet6_ifaddr *ifp) >> __ipv6_dev_ac_dec(ifp->idev, &addr); >> } >> >> -static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev) >> +static int addrconf_ifid_6lowpan(u8 *eui, struct net_device *dev) >> { >> - if (dev->addr_len != EUI64_ADDR_LEN) >> + switch (dev->addr_len) { >> + case ETH_ALEN: >> + return addrconf_ifid_eui48(eui, dev); >> + case EUI64_ADDR_LEN: >> + memcpy(eui, dev->dev_addr, EUI64_ADDR_LEN); >> + eui[0] ^= 2; >> + break; >> + default: >> return -1; >> - memcpy(eui, dev->dev_addr, EUI64_ADDR_LEN); >> - eui[0] ^= 2; >> + } >> + >> return 0; >> } >> >> @@ -2146,7 +2153,7 @@ static int ipv6_generate_eui64(u8 *eui, struct >> net_device *dev) >> case ARPHRD_IPGRE: >> return addrconf_ifid_gre(eui, dev); >> case ARPHRD_6LOWPAN: >> - return addrconf_ifid_eui64(eui, dev); >> + return addrconf_ifid_6lowpan(eui, dev); >> case ARPHRD_IEEE1394: >> return addrconf_ifid_ieee1394(eui, dev); >> case ARPHRD_TUNNEL6: >> > > Against which tree did you make this patch? Seems it needs a rebase. > > Applying it against bluetooth-next master branch: > > Applying: ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration > error: patch failed: net/ipv6/addrconf.c:2146 > error: net/ipv6/addrconf.c: patch does not apply > Patch failed at 0001 ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration It should be fine in v4: Applying: ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration Using index info to reconstruct a base tree... M net/ipv6/addrconf.c Falling back to patching base and 3-way merge... Auto-merging net/ipv6/addrconf.c -- Luiz Augusto von Dentz ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-21 8:49 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20170217155003.4594-1-luiz.dentz@gmail.com> [not found] ` <20170217155003.4594-5-luiz.dentz@gmail.com> [not found] ` <20170217155003.4594-5-luiz.dentz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-02-20 22:10 ` [PATCH v3 4/5] ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration Stefan Schmidt 2017-02-21 8:49 ` Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).