On Thu, Jul 14, 2022 at 12:23:26PM +0200, Claudio Jeker wrote:
> Noticed while syncing code. I missed some scope_id assignments and checks
> in a few places.
> 
> - VPN6 missed all of it
> - in kr_redistribute6() the copy is not really needed since link local
>   address can not be redistributed (I still added it though)
> - kroute6_compare() do actually compare the scope_id of a prefix.
>   This should make handling of link local addrs a bit more robust.
> - in kroute6_find() set the scope_id else kroute6_compare() will match
>   against stack garbage.
> - in kroute6_matchgw() we need to compare the scope_id as well
> - in kr_fib_change() compare nexthop with scope_id to know if it changed
>   and update the scope_id as well afterwards.
> 
> Works for me

This looks good and I can't find any other missed instances in kroute.c

ok tb

> @@ -3524,9 +3534,13 @@ add4:
>                               if (kl->nexthop.aid == AID_INET6) {
>                                       if (memcmp(&kr6->nexthop,
>                                           &kl->nexthop.v6,
> -                                         sizeof(struct in6_addr)))
> +                                         sizeof(struct in6_addr)) ||
> +                                         kr6->nexthop_scope_id != 

trailing space after !=

Reply via email to