Skip to contentSkip to conversation

netlink NLM_F_DUMP for unsupported address family / PF_UNSPEC

DISCUSSION Timo Teras 1 participant 1 message Dec 27, 2012

Subsystems (2)
lore
Share & tools
lore

Timo Teras

author
#0 lore raw

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