Re: This counter "ip6InNoRoutes" does not follow the RFC4293 specification implementation

From: David Ahern
Date: Tue Mar 08 2022 - 23:50:10 EST


On 3/8/22 7:16 PM, Xiao, Jiguang wrote:
> Hi David
>
> To confirm whether my test method is correct, could you please briefly describe your test procedure?
>
>
>

no formal test. Code analysis (ip6_pkt_discard{,_out} -> ip6_pkt_drop)
shows the counters that should be incrementing and then looking at the
counters on a local server.

FIB Lookup failures should generate a dst with one of these handlers:

static void ip6_rt_init_dst_reject(struct rt6_info *rt, u8 fib6_type)
{
rt->dst.error = ip6_rt_type_to_error(fib6_type);

switch (fib6_type) {
case RTN_BLACKHOLE:
rt->dst.output = dst_discard_out;
rt->dst.input = dst_discard;
break;
case RTN_PROHIBIT:
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
case RTN_THROW:
case RTN_UNREACHABLE:
default:
rt->dst.output = ip6_pkt_discard_out;
rt->dst.input = ip6_pkt_discard;
break;
}
}

They all drop the packet with a given counter bumped.