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

2015-12-14 Thread Hannes Frederic Sowa
Hello, On 08.12.2015 19:57, Bjørn Mork wrote: > Hannes Frederic Sowa writes: >> On 05.12.2015 20:02, Bjørn Mork wrote: >>> Hannes Frederic Sowa writes: On Thu, Dec 3, 2015, at 20:29, Bjørn Mork wrote: > After looking more at

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

2015-12-14 Thread Bjørn Mork
Hannes Frederic Sowa writes: > Sorry for answering so late... No problem. There is no rush here AFAICS. Thanks for taking the time to look at this. > What do you think about simply using IN6_ADDR_GEN_MODE_RANDOM? Yes, that's fine with me (actually what I first

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

2015-12-08 Thread Hannes Frederic Sowa
On 05.12.2015 20:02, Bjørn Mork wrote: > Hannes Frederic Sowa writes: >> On Thu, Dec 3, 2015, at 20:29, Bjørn Mork wrote: >> >>> After looking more at addrconf, I started wondering if we couldn't abuse >>> ipv6_generate_stable_address() for this purpose? We could add

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

2015-12-08 Thread Bjørn Mork
Hannes Frederic Sowa writes: > On 05.12.2015 20:02, Bjørn Mork wrote: >> Hannes Frederic Sowa writes: >>> On Thu, Dec 3, 2015, at 20:29, Bjørn Mork wrote: >>> After looking more at addrconf, I started wondering if we couldn't abuse

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

2015-12-05 Thread Bjørn Mork
Hannes Frederic Sowa writes: > On Thu, Dec 3, 2015, at 20:29, Bjørn Mork wrote: > >> After looking more at addrconf, I started wondering if we couldn't abuse >> ipv6_generate_stable_address() for this purpose? We could add a new >> addr_gen_mode which would trigger

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

2015-12-04 Thread Hannes Frederic Sowa
Hello, On Thu, Dec 3, 2015, at 20:29, Bjørn Mork wrote: > Hannes Frederic Sowa writes: > > > I see no problem with the patch as it eases operating those devices. I > > would also suggest storing the ifid in the inet6_dev so it does only > > change during device

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

2015-12-03 Thread Bjørn Mork
Hannes Frederic Sowa writes: > I see no problem with the patch as it eases operating those devices. I > would also suggest storing the ifid in the inet6_dev so it does only > change during device creation and destruction. Otherwise I would > recommend to use stable

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

2015-12-01 Thread Hannes Frederic Sowa
Hello, On Mon, Nov 30, 2015, at 12:55, Bjørn Mork wrote: > Generating a random ifid for devices with no L2 header > at all, allowing such devices to take part in IPv6 > autoconfiguration. The tuntap driver is one example of > a driver where such an ifid would be useful. > > Note that as there is

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

2015-11-30 Thread YOSHIFUJI Hideaki
Hi, Bjørn Mork wrote: > 吉藤英明 writes: > +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

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

2015-11-30 Thread 吉藤英明
Hi, 2015-11-30 20:55 GMT+09:00 Bjørn Mork : > Generating a random ifid for devices with no L2 header > at all, allowing such devices to take part in IPv6 > autoconfiguration. The tuntap driver is one example of > a driver where such an ifid would be useful. > > Note that as there

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

2015-11-30 Thread Bjørn Mork
Generating a random ifid for devices with no L2 header at all, allowing such devices to take part in IPv6 autoconfiguration. The tuntap driver is one example of a driver where such an ifid would be useful. Note that as there is no persistence, new addresses will be generated every time an

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

2015-11-30 Thread Bjørn Mork
吉藤英明 writes: >>> +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 >