On 9/13/18 1:38 PM, Peter Oskolkov wrote:

> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 3eed045c65a5..a3902f805305 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -946,7 +946,7 @@ static void ip6_rt_init_dst_reject(struct rt6_info *rt, 
> struct fib6_info *ort)
>  
>  static void ip6_rt_init_dst(struct rt6_info *rt, struct fib6_info *ort)
>  {
> -     rt->dst.flags |= fib6_info_dst_flags(ort);
> +     rt->dst.flags |= fib6_info_dst_flags(ort) & ~DST_NOCOUNT;

I think my mistake is setting dst.flags in ip6_rt_init_dst. Flags
argument is passed to ip6_dst_alloc which is always invoked before
ip6_rt_copy_init is called which is the only caller of ip6_rt_init_dst.

>  
>       if (ort->fib6_flags & RTF_REJECT) {
>               ip6_rt_init_dst_reject(rt, ort);
> 

Reply via email to