ip: add NLM_F_ECHO support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | ip: add NLM_F_ECHO supportinclude/ ip/ ip/ +5 more | +108 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH iproute2-next 0/1] ip: add NLM_F_ECHO support
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(-)
Signature · 1 line
2.37.2