lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220916033428.400131-1-liuhangbin@gmail.com>
Date:   Fri, 16 Sep 2022 11:34:27 +0800
From:   Hangbin Liu <liuhangbin@...il.com>
To:     netdev@...r.kernel.org
Cc:     David Ahern <dsahern@...nel.org>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Guillaume Nault <gnault@...hat.com>,
        Hangbin Liu <liuhangbin@...il.com>
Subject: [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(-)

-- 
2.37.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ