# Re: \[PATCH net-next\] gre/sit: Don't generate link-local addr if addr\_gen\_mode is IN6\_ADDR\_GEN\_MODE\_NONE

- From: Antonio Quartulli \<hidden\>
- Date: 2021-10-21 13:41:15 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/10/11214111
- Thread: https://ratatoskr.run/netdev/2021/10/11214042/t.md

```text
Hi,

On 21/10/2021 15:22, Stephen Suryaputra wrote:
> On Thu, Oct 21, 2021 at 02:52:44PM +0200, Antonio Quartulli wrote:
>>
>> Maybe I am missing something, but why checking the mode only for
>> pointtopoint? If mode is NONE shouldn't this routine just abort
>> regardless of the interface setup?
>>
> If it isn't pointtopoint, the function sets up IPv4-compatible IPv6
> address, i.e. non link-local (FE80::). addr_gen_mode NONE (1) is only
> controlling the generation of link-local address. Quoting from the
> sysctl doc:
> 
> addr_gen_mode - INTEGER
> 	Defines how link-local and autoconf addresses are generated.
> 
> 	0: generate address based on EUI64 (default)
> 	1: do no generate a link-local address, use EUI64 for addresses generated
> 	   from autoconf
> 	2: generate stable privacy addresses, using the secret from
> 	   stable_secret (RFC7217)
> 	3: generate stable privacy addresses, using a random secret if unset
> 
> So, I thought the checking should be strictly when the link-local
> address is about to be generated.

Right.

IMHO it makes sense.

Acked-by: Antonio Quartulli <redacted>

-- 
Antonio Quartulli
```
