On Tue, 31 Oct 2017 13:00:47 -0700
Greg Greenway <[email protected]> wrote:
> + if (tb[FOU_ATTR_AF]) {
> + family = rta_getattr_u8(tb[FOU_ATTR_AF]);
> + if (family == AF_INET)
> + family_str = "AF_INET";
> + else if (family == AF_INET6)
> + family_str = "AF_INET6";
> + else
> + family_str = "unknown";
> + fprintf(fp, "af %s ", family_str);
The unwritten rule for ip commands is that the show function
must format the output with same command syntax as the other commands
set/add/delete.
Since there is no "af AF_INET" option to ip fou, this breaks that convention.
Either ignore the address family, change the add command, or output with same
syntax (-6); preferably the latter.