netlink NLM_F_DUMP for unsupported address family / PF_UNSPEC

From: Timo Teras <hidden>
Date: 2012-12-27 15:19:33

It seems that currently PF_UNSPEC is overloaded when dumping rtnetlink
things. It is used for two purposes: as wildcard entry to dump
all protocol families, and as fallback for unsupported families.

On my system with IPv[46] only and no IPX, running "ip -f ipx
route" would print the IPv4 and IPv6 routes instead of "unsupported" or
"not implemented" error which is rather confusing and unexpected.

Just removing the fallback from rtnl_get_dumpit() does not sound right
since some commands seem to rely on this behaviour e.g. RTM_GETQDISC.

Perhaps rtnl_dump_all should check that request family truly was
PF_UNSPEC or error out if not?

- Timo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help