diff options
| author | Stefano Brivio <sbrivio@redhat.com> | 2019-06-21 11:45:21 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-06-24 13:18:48 -0400 |
| commit | b597ca6e8312937450dbae945f9d58c6eb35da0e (patch) | |
| tree | d0a4846d36d3a10bb81dcb200d8bb91506540639 | |
| parent | 564c91f7e563256be835f31db97a60908702c9ec (diff) | |
ipv4/fib_frontend: Allow RTM_F_CLONED flag to be used for filtering
This functionally reverts the check introduced by commit
e8ba330ac0c5 ("rtnetlink: Update fib dumps for strict data checking")
as modified by commit e4e92fb160d7 ("net/ipv4: Bail early if user only
wants prefix entries").
As we are preparing to fix listing of IPv4 cached routes, we need to
give userspace a way to request them.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/ipv4/fib_frontend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index ed7fb5fd885c..317339cd7f03 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
| @@ -987,8 +987,8 @@ static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 987 | filter.flags = rtm->rtm_flags & (RTM_F_PREFIX | RTM_F_CLONED); | 987 | filter.flags = rtm->rtm_flags & (RTM_F_PREFIX | RTM_F_CLONED); |
| 988 | } | 988 | } |
| 989 | 989 | ||
| 990 | /* fib entries are never clones and ipv4 does not use prefix flag */ | 990 | /* ipv4 does not use prefix flag */ |
| 991 | if (filter.flags & (RTM_F_PREFIX | RTM_F_CLONED)) | 991 | if (filter.flags & RTM_F_PREFIX) |
| 992 | return skb->len; | 992 | return skb->len; |
| 993 | 993 | ||
| 994 | if (filter.table_id) { | 994 | if (filter.table_id) { |
