Subject: Re: [PATCH 1/1] ipv6 addrconf: add IFA_F_NOPREFIXROUTE flag to suppress creation of IP6 routes

From: Hannes Frederic Sowa <[email-masked]>
Date: Tue, 7 Jan 2014 10:39:42 +0100

On Mon, Jan 06, 2014 at 06:38:37PM +0100, Jiri Pirko wrote:
> Mon, Jan 06, 2014 at 06:29:35PM CET, [email-masked] wrote:
> >When adding/modifying an IPv6 address, the userspace application needs
> >a way to suppress adding a prefix route. This is for example relevant
> >together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf
> >generated addresses, but depending on on-link, no route should for the
> >prefix should be added.
> >
> >This flag will not be set as ifa_flags of the address, it is only
> >considered as parameter while adding/modifying an address.
> >
> >Signed-off-by: Thomas Haller <[email-masked]>
> >---
> > Hi, how about this?
> >
> > The flag is only a parameter for the netlink command.
> > This might be unexpected, because when adding an address,
> > you won't see the flag in `ip -6 addr`.
> > Still, I think, it is better to do it this way, because having
> > an address with the NOPREFIXROUTE flag, does not mean, that
> > there is no route for this prefix. It only means, that at the
> > moment of setting the address, no route was added.
> >
> > The alternative would be, not to add a prefix route, when
> > IFA_F_MANAGERTEMPADDR is set.

Looks good, maybe you could apply Jiri's feedback.

Otherwise we could skip trying to find a corresponding prefix route in
ipv6_del_addr. You would need to add the IFA_F_NOPREFIXROUTE test just before
the addrconf_get_prefix_route and ip6_del_rt.

Greetings,

  Hannes