Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Subject: Re: [RFC bluetooth-next 2/4] ieee802154: 6lowpan: fix ARPHRD to ARPHRD_6LOWPAN
Date: Wed, 21 Jan 2015 21:24:44 +0100	[thread overview]
Message-ID: <20150121202442.GB664@omega> (raw)
In-Reply-To: <1421787462-24042-3-git-send-email-alex.aring@gmail.com>

Hi,

On Tue, Jan 20, 2015 at 09:57:40PM +0100, Alexander Aring wrote:
> Currently there exists two interface types with ARPHRD_IEEE802154. These
> are the 802.15.4 interfaces and 802.15.4 6LoWPAN interfaces. This is
> more a bug because some userspace applications checks on this value like
> wireshark. This occurs that wireshark will always try to parse a lowpan
> interface as 802.15.4 frames. With ARPHRD_6LOWPAN wireshark will parse
> it as IPv6 frames which is correct.
> 
> Much applications checks on this value to readout the EUI64 mac address
> which should be the same for ARPHRD_6LOWPAN. BTLE 6LoWPAN and ieee802154
> 6LoWPAN will share now the same ARPHRD.
> 
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
>  net/ieee802154/6lowpan/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
> index 055fbb7..9dbe0d69 100644
> --- a/net/ieee802154/6lowpan/core.c
> +++ b/net/ieee802154/6lowpan/core.c
> @@ -113,7 +113,7 @@ static void lowpan_setup(struct net_device *dev)
>  {
>  	dev->addr_len		= IEEE802154_ADDR_LEN;
>  	memset(dev->broadcast, 0xff, IEEE802154_ADDR_LEN);
> -	dev->type		= ARPHRD_IEEE802154;
> +	dev->type		= ARPHRD_6LOWPAN;
>  	/* Frame Control + Sequence Number + Address fields + Security Header */
>  	dev->hard_header_len	= 2 + 1 + 20 + 14;
>  	dev->needed_tailroom	= 2; /* FCS */
> -- 
> 2.2.2
> 

A little list of applications which need to update afterwards this patch:

 - radvd [0]
 - unstrung [1]


I know this will break the above software, but we need really to do this
step. Any complaints here according to this patch?

- Alex

[0] https://github.com/reubenhwk/radvd/blob/master/device-linux.c#L82
[1] https://github.com/mcr/unstrung/blob/5e7c4060730ab4f81ddcd75657d87ec78da91bd6/lib/libndmgmt/netlink.cpp#L358

  reply	other threads:[~2015-01-21 20:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 20:57 [RFC bluetooth-next 0/4] ieee802154: UAPI changes Alexander Aring
2015-01-20 20:57 ` [RFC bluetooth-next 1/4] ieee802154: set wpan netdev devtype Alexander Aring
2015-01-20 20:57 ` [RFC bluetooth-next 2/4] ieee802154: 6lowpan: fix ARPHRD to ARPHRD_6LOWPAN Alexander Aring
2015-01-21 20:24   ` Alexander Aring [this message]
2015-01-20 20:57 ` [RFC bluetooth-next 3/4] ieee802154: change wpan-phy name to phy Alexander Aring
2015-01-20 20:57 ` [RFC bluetooth-next 4/4] ieee802154: remove deprecated sysfs entries Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150121202442.GB664@omega \
    --to=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox