Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2-next 0/1] ip: add NLM_F_ECHO support
@ 2022-09-16  3:34 Hangbin Liu
  2022-09-16  3:34 ` [PATCH iproute2-next 1/1] " Hangbin Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Hangbin Liu @ 2022-09-16  3:34 UTC (permalink / raw)
  To: netdev; +Cc: David Ahern, Stephen Hemminger, Guillaume Nault, Hangbin Liu

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-23  4:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-16  3:34 [PATCH iproute2-next 0/1] ip: add NLM_F_ECHO support Hangbin Liu
2022-09-16  3:34 ` [PATCH iproute2-next 1/1] " Hangbin Liu
2022-09-22 23:17   ` David Ahern
2022-09-23  4:15     ` Hangbin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox