diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2023-02-12 12:30:20 +0800 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2023-07-09 20:26:23 +0200 |
commit | 6ce1dc2e91398145633ceaff7a6fecc786826277 (patch) | |
tree | 18b1c21996921d91ff7e9c7636497c94c72f8712 /networking/libiproute | |
parent | e41e481fd5716fc9b2e2fdf2670d72c727ecb37f (diff) | |
download | busybox-w32-6ce1dc2e91398145633ceaff7a6fecc786826277.tar.gz busybox-w32-6ce1dc2e91398145633ceaff7a6fecc786826277.tar.bz2 busybox-w32-6ce1dc2e91398145633ceaff7a6fecc786826277.zip |
libiproute: fix filtering ip6 route by table id
Otherwise
- "ip -6 route show" shows routes from all tables
- "ip -6 route show table 200" shows nothing
function old new delta
print_route 1962 1941 -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-21) Total: -21 bytes
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute')
-rw-r--r-- | networking/libiproute/iproute.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 5a972f8b2..cd77f642f 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -111,15 +111,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM, | |||
111 | if (r->rtm_flags & RTM_F_CLONED) { | 111 | if (r->rtm_flags & RTM_F_CLONED) { |
112 | return 0; | 112 | return 0; |
113 | } | 113 | } |
114 | if (G_filter.tb == RT_TABLE_LOCAL) { | 114 | if (G_filter.tb != tid) { |
115 | if (r->rtm_type != RTN_LOCAL) { | ||
116 | return 0; | ||
117 | } | ||
118 | } else if (G_filter.tb == RT_TABLE_MAIN) { | ||
119 | if (r->rtm_type == RTN_LOCAL) { | ||
120 | return 0; | ||
121 | } | ||
122 | } else { | ||
123 | return 0; | 115 | return 0; |
124 | } | 116 | } |
125 | } | 117 | } |