From: Hangbin Liu <liuhangbin@gmail.com>
To: netdev@vger.kernel.org
Cc: David Ahern <dsahern@kernel.org>,
Stephen Hemminger <stephen@networkplumber.org>,
Guillaume Nault <gnault@redhat.com>,
Hangbin Liu <liuhangbin@gmail.com>
Subject: [PATCH iproute2-next 0/1] ip: add NLM_F_ECHO support
Date: Fri, 16 Sep 2022 11:34:27 +0800 [thread overview]
Message-ID: <20220916033428.400131-1-liuhangbin@gmail.com> (raw)
Hi,
As the patch did, here I just pust the test result for each commands
# ip -echo addr add 192.168.0.1/24 dev eth1
3: eth1 inet 192.168.0.1/24 scope global eth1
valid_lft forever preferred_lft forever
# ip -j -p -echo addr del 192.168.0.1/24 dev eth1
[ {
"deleted": true,
"index": 3,
"dev": "eth1",
"family": "inet",
"local": "192.168.0.1",
"prefixlen": 24,
"scope": "global",
"label": "eth1",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
} ]
# ip -o -echo addr add 192.168.0.1/24 dev eth1
3: eth1 inet 192.168.0.1/24 scope global eth1\ valid_lft forever preferred_lft forever
# ip -br -echo addr del 192.168.0.1/24 dev eth1
Deleted 192.168.0.1/24
# ip -echo nexthop add id 1 via 192.168.0.254 dev eth1
id 1 via 192.168.0.254 dev eth1 scope link
# ip -j -p -echo nexthop del id 1
[ {{
"deleted": true,
"id": 1,
"gateway": "192.168.0.254",
"dev": "eth1",
"scope": "link",
"flags": [ ]
}
} ]
# ip -echo -6 route add 2022::1/64 via 2000::254 dev eth1
2022::/64 via 2000::254 dev eth1 metric 1024 pref medium
# ip -j -p -echo -6 route del 2022::1/64 via 2000::254 dev eth1
[ {{
"deleted": true,
"dst": "2022::/64",
"gateway": "2000::254",
"dev": "eth1",
"metric": 1024,
"flags": [ ],
"pref": "medium"
}
} ]
# ip -echo rule add from 192.168.1.10 table 10
32765: from 192.168.1.10 lookup 10
# ip -j -p -echo rule del table 10
[ {{
"deleted": true,
"priority": 32765,
"src": "192.168.1.10",
"table": "10"
}
} ]
# test if the cmd doesn't support -echo
# ip -echo neigh add 192.168.0.2 dev eth1 lladdr 00:00:00:00:00:01
# ip -echo neigh del 192.168.0.2 dev eth1 lladdr 00:00:00:00:00:01
Hangbin Liu (1):
ip: add NLM_F_ECHO support
include/utils.h | 1 +
ip/ip.c | 3 +++
ip/ipaddress.c | 23 +++++++++++++++++++++--
ip/iplink.c | 20 +++++++++++++++++++-
ip/ipnexthop.c | 21 ++++++++++++++++++++-
ip/iproute.c | 21 ++++++++++++++++++++-
ip/iprule.c | 21 ++++++++++++++++++++-
man/man8/ip.8 | 4 ++++
8 files changed, 108 insertions(+), 6 deletions(-)
--
2.37.2
next reply other threads:[~2022-09-16 3:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 3:34 Hangbin Liu [this message]
2022-09-16 3:34 ` [PATCH iproute2-next 1/1] ip: add NLM_F_ECHO support Hangbin Liu
2022-09-22 23:17 ` David Ahern
2022-09-23 4:15 ` Hangbin Liu
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=20220916033428.400131-1-liuhangbin@gmail.com \
--to=liuhangbin@gmail.com \
--cc=dsahern@kernel.org \
--cc=gnault@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).