Thread (8 messages) 8 messages, 4 authors, 2013-10-31

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

From: Jukka Rissanen <hidden>
Date: 2013-10-30 10:15:25

Hi Alexander,

On 30.10.2013 11:31, Alexander Aring wrote:
Hi Jukka,

On Wed, Oct 30, 2013 at 11:11:11AM +0200, Jukka Rissanen wrote:
quoted
Signed-off-by: Jukka Rissanen <redacted>
---
  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?
No issues there, I can certainly prepare a patch that uses the 
addrconf_ifid_eui64() instead.


-- 
Cheers,
Jukka
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help