|
@@ -829,6 +829,7 @@ int ip_valid_fib_dump_req(struct net *net, const struct nlmsghdr *nlh,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
+ filter->dump_all_families = (rtm->rtm_family == AF_UNSPEC);
|
|
|
filter->flags = rtm->rtm_flags;
|
|
|
filter->protocol = rtm->rtm_protocol;
|
|
|
filter->rt_type = rtm->rtm_type;
|
|
@@ -899,6 +900,9 @@ static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
|
|
|
if (filter.table_id) {
|
|
|
tb = fib_get_table(net, filter.table_id);
|
|
|
if (!tb) {
|
|
|
+ if (filter.dump_all_families)
|
|
|
+ return skb->len;
|
|
|
+
|
|
|
NL_SET_ERR_MSG(cb->extack, "ipv4: FIB table does not exist");
|
|
|
return -ENOENT;
|
|
|
}
|