Thread (12 messages) 12 messages, 3 authors, 2015-12-14

Re: [RFC] ipv6: use a random ifid for headerless devices

From: Bjørn Mork <bjorn@mork.no>
Date: 2015-11-30 13:55:41

吉藤英明 [off-list ref] writes:
quoted
quoted
+static int addrconf_ifid_random(u8 *eui, struct net_device *dev)
+{
+       get_random_bytes(eui, 8);
+       eui[0] |= 0x02;
+       return 0;
+}
+
Since random identifier is locally assigned, drop the global bit
instead if setting it.
Yes, definitely. Thanks.  I'm considering reusing __ipv6_regen_rndid()
which already does this correctly, and also avoids some locally assigned
addresses with special meanings.

Another issue with the initial RFC is that every prefix will have a new
random ifid, which isn't necessarily what the users expect.  I wonder if
it would be acceptable to abuse the rndid field for storing a "permanent"
random ifid?


Bjørn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help