netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] ipv6: Add checks for RAWIP ARP type
Date: Wed, 30 Oct 2013 10:31:38 +0100	[thread overview]
Message-ID: <20131030093137.GA3431@omega> (raw)
In-Reply-To: <1383124271-15290-3-git-send-email-jukka.rissanen@linux.intel.com>

Hi Jukka,

On Wed, Oct 30, 2013 at 11:11:11AM +0200, Jukka Rissanen wrote:
> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
> ---
>  net/ipv6/addrconf.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index d6ff126..60bf947 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -1783,6 +1783,15 @@ static int addrconf_ifid_ip6tnl(u8 *eui, struct net_device *dev)
>  	return 0;
>  }
>  
> +static int addrconf_ifid_rawip(u8 *eui, struct net_device *dev)
> +{
> +	if (dev->addr_len != 8)
> +		return -1;
> +	memcpy(eui, dev->dev_addr, 8);
> +	eui[0] ^= 2;
> +	return 0;
> +}
> +

I think we have already a function like this, look for:

static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev)

which is the same for ieee802154 6lowpan. Are there any issues why we
can't use the same function here?

- Alex

  reply	other threads:[~2013-10-30  9:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30  9:11 [PATCH 0/2] Add support for ARPHRD_RAWIP Jukka Rissanen
2013-10-30  9:11 ` [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type Jukka Rissanen
2013-10-30 21:25   ` David Miller
2013-10-30 22:26     ` Marcel Holtmann
2013-10-31  4:27       ` David Miller
2013-10-30  9:11 ` [PATCH 2/2] ipv6: Add checks for RAWIP ARP type Jukka Rissanen
2013-10-30  9:31   ` Alexander Aring [this message]
2013-10-30 10:15     ` Jukka Rissanen

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=20131030093137.GA3431@omega \
    --to=alex.aring@gmail.com \
    --cc=jukka.rissanen@linux.intel.com \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).