From: xuchunmei <xuchunmei@linux.alibaba.com>
To: netdev@vger.kernel.org
Subject: ip-nexthop does not support flush by id
Date: Tue, 30 Mar 2021 20:44:30 +0800 [thread overview]
Message-ID: <C2B7C7DB-B613-41BB-9D5F-EF162181988C@linux.alibaba.com> (raw)
Hi,
I use iproute-5.10 with kernel-5.10.6, I found that ip-nexthop does not support flush by id, is it by design?
Reproduce steps:
# ip netns add me
# ip -netns me addr add 127.0.0.1/8 dev lo
# ip -netns me link set lo up
# ip -netns me nexthop add id 105 blackhole proto 99
# ip -netns me nexthop flush id 105
id 105 blackhole proto 99
# ip -netns me nexthop ls
id 105 blackhole proto 99
while use flush without any args, flush will success.
# ip -netns me nexthop flush
Flushed 1 nexthops
I find the function ipnh_list_flush implemented in ipnexthop.c:
else if (!strcmp(*argv, "id")) {
__u32 id;
NEXT_ARG();
if (get_unsigned(&id, *argv, 0))
invarg("invalid id value", *argv);
return ipnh_get_id(id);
}
When args is “id”, just return the related info of “id”, so I want to known is it by design ?
next reply other threads:[~2021-03-30 12:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 12:44 xuchunmei [this message]
2021-03-30 13:05 ` ip-nexthop does not support flush by id Ido Schimmel
2021-03-30 15:04 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C2B7C7DB-B613-41BB-9D5F-EF162181988C@linux.alibaba.com \
--to=xuchunmei@linux.alibaba.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).