rtnl: when querying local addresses and gateways, take address family into account