Re: slaacd(8): router lifetime zero vs. prefixes

2022-01-02 Thread Denis Fondras
Le Sat, Jan 01, 2022 at 11:38:14AM +0100, Florian Obser a écrit :
> ping
> On 2021-12-27 17:01 +01, Florian Obser  wrote:
> > Prefix life time is independent from router life time.
> > Form an IPv6 address even if the router announcing the prefix isn't a
> > default router.
> > Problem reported by mgraves AT brainfat.net on misc
> >
> > OK?

It feels counter intuitive to have a *router* advertisement without a router.

Otherwise OK denis@



Re: slaacd(8): router lifetime zero vs. prefixes

2022-01-01 Thread Florian Obser
ping
On 2021-12-27 17:01 +01, Florian Obser  wrote:
> Prefix life time is independent from router life time.
> Form an IPv6 address even if the router announcing the prefix isn't a
> default router.
> Problem reported by mgraves AT brainfat.net on misc
>
> OK?
>
> diff --git engine.c engine.c
> index 81a06cc5528..7a2c11e1bc2 100644
> --- engine.c
> +++ engine.c
> @@ -1749,14 +1749,13 @@ void update_iface_ra(struct slaacd_iface *iface, 
> struct radv *ra)
>  
>   update_iface_ra_dfr(iface, ra);
>  
> - if (ra->router_lifetime != 0)
> - LIST_FOREACH(prefix, >prefixes, entries) {
> - if (!prefix->autonomous || prefix->vltime == 0 ||
> - prefix->pltime > prefix->vltime ||
> - IN6_IS_ADDR_LINKLOCAL(>prefix))
> - continue;
> - update_iface_ra_prefix(iface, ra, prefix);
> - }
> + LIST_FOREACH(prefix, >prefixes, entries) {
> + if (!prefix->autonomous || prefix->vltime == 0 ||
> + prefix->pltime > prefix->vltime ||
> + IN6_IS_ADDR_LINKLOCAL(>prefix))
> + continue;
> + update_iface_ra_prefix(iface, ra, prefix);
> + }
>  
>   update_iface_ra_rdns(iface, ra);
>  }
>
> -- 
>
> I'm not entirely sure you are real.
>

-- 
I'm not entirely sure you are real.



slaacd(8): router lifetime zero vs. prefixes

2021-12-27 Thread Florian Obser
Prefix life time is independent from router life time.
Form an IPv6 address even if the router announcing the prefix isn't a
default router.
Problem reported by mgraves AT brainfat.net on misc

OK?

diff --git engine.c engine.c
index 81a06cc5528..7a2c11e1bc2 100644
--- engine.c
+++ engine.c
@@ -1749,14 +1749,13 @@ void update_iface_ra(struct slaacd_iface *iface, struct 
radv *ra)
 
update_iface_ra_dfr(iface, ra);
 
-   if (ra->router_lifetime != 0)
-   LIST_FOREACH(prefix, >prefixes, entries) {
-   if (!prefix->autonomous || prefix->vltime == 0 ||
-   prefix->pltime > prefix->vltime ||
-   IN6_IS_ADDR_LINKLOCAL(>prefix))
-   continue;
-   update_iface_ra_prefix(iface, ra, prefix);
-   }
+   LIST_FOREACH(prefix, >prefixes, entries) {
+   if (!prefix->autonomous || prefix->vltime == 0 ||
+   prefix->pltime > prefix->vltime ||
+   IN6_IS_ADDR_LINKLOCAL(>prefix))
+   continue;
+   update_iface_ra_prefix(iface, ra, prefix);
+   }
 
update_iface_ra_rdns(iface, ra);
 }

-- 
I'm not entirely sure you are real.