Subject: Re: [PATCH 2/2] ipv6: Add checks for RAWIP ARP type

From: Alexander Aring <[email-masked]>
Date: Wed, 30 Oct 2013 10:31:38 +0100

Hi Jukka,

On Wed, Oct 30, 2013 at 11:11:11AM +0200, Jukka Rissanen wrote:
> Signed-off-by: Jukka Rissanen <[email-masked]>
> ---
>  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