Re: [PATCH net] ipv6: fix prefix route expiry in modify_prefix_route()

From: Hangbin Liu

Date: Thu Sep 24 2026 - 07:58:09 EST


On Thu, Sep 24, 2026 at 12:35:18PM +0900, Qishuai Liu wrote:
> On Thu, Sep 24, 2026 at 10:18 AM Hangbin Liu <hangbin.liu@xxxxxxxxx> wrote:
> >
> > On Wed, Sep 23, 2026 at 01:20:48PM +0000, Qishuai Liu wrote:
> > > modify_prefix_route() is given the lifetime in clock_t relative to now,
> > > but fib6_set_expires() wants an absolute jiffies value. So when a
> > > permanent address is changed to a finite valid_lft, the prefix route
> > > ends up already expired and GC removes it.
> >
> > nit: Does GC really removes it? I see the expires is negative, but the time
> > seems overflow and GC won't remove it.
>
> Yes, it is removed once the fib6 GC runs, i.e. within gc_interval if
> the GC timer is already armed by another expiring route, or right away
> with "sysctl -w net.ipv6.route.flush=1".

Ah, yes.

Thanks
Hangbin