From: David Ahern <dsah...@gmail.com>
Date: Sun, 25 Feb 2018 11:47:18 -0800

> +static void ip6_rt_init_dst(struct rt6_info *rt, struct rt6_info *ort)
> +{
 ...
> +     rt->dst.error = 0;
> +     rt->dst.output = ip6_output;
 ...
> @@ -930,14 +999,12 @@ static void rt6_set_from(struct rt6_info *rt, struct 
> rt6_info *from)
>  
>  static void ip6_rt_copy_init(struct rt6_info *rt, struct rt6_info *ort)
>  {
> -     rt->dst.input = ort->dst.input;
> -     rt->dst.output = ort->dst.output;
> +     ip6_rt_init_dst(rt, ort);
> +
>       rt->rt6i_dst = ort->rt6i_dst;
> -     rt->dst.error = ort->dst.error;
>       rt->rt6i_idev = ort->rt6i_idev;
>       if (rt->rt6i_idev)
>               in6_dev_hold(rt->rt6i_idev);
> -     rt->dst.lastuse = jiffies;
>       rt->rt6i_gateway = ort->fib6_nh.nh_gw;
>       rt->rt6i_flags = ort->rt6i_flags;
>       rt6_set_from(rt, ort);

This seems to change behavior.

In the old code, the dst error value is propagated from 'ort' into 'rt'.

Here you set it to zero and that's it.

Is it set somewhere else?

I don't think you can assume that all routes that go via this copy
path are not reject routes or other kinds that need the error code
set, if that is what you were thinking.

Thanks.

Reply via email to