Hello Adam,

> Is it valid for RTM_F_CLONED to be set but ci to be NULL? If so, this
> changes the semantics: "cache" will no longer be printed if RTM_F_CLONED
> is set and ci is NULL.

In kernel code it seems to set RTM_F_CLONED and RTA_CACHEINFO
independently in net/ipv6/route.c:rt6_fill_node() (note: for IPv4 it
seems RTM_F_CLONED is set unconditionally), didn't dig further.

So, the code can be simplified even more, then (pseudocode):

  if (RTM_F_CLONED) print("cache");
  if (RTA_CACHEINFO) { ci=...; print("expires..."); }

Cheers,

Xabier Oneca_,,_
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to