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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZgUfQTtEjkFDwCX9@Laptop-X1>
Date: Thu, 28 Mar 2024 15:41:53 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Donald Hunter <donald.hunter@...il.com>,
	Jiri Pirko <jiri@...nulli.us>,
	Jacob Keller <jacob.e.keller@...el.com>,
	Stanislav Fomichev <sdf@...gle.com>
Subject: Re: [PATCH net-next 2/2] ynl: support un-nest sub-type for
 indexed-array

Hi Jakub,
On Tue, Mar 26, 2024 at 02:37:28PM +0800, Hangbin Liu wrote:
> Support un-nest sub-type for indexed-array. Since all the attr types are
> same for un-nest sub-ype, the index number is used as attr name.
> The result would look like:
> 
>  # ip link add bond0 type bond mode 1 \
>    arp_ip_target 192.168.1.1,192.168.1.2 ns_ip6_target 2001::1,2001::2
>  # ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \
>    --do getlink --json '{"ifname": "bond0"}' --output-json | jq '.linkinfo'
> 
>     "arp-ip-target": [
>       {
>         "1": "192.168.1.1"
>       },
>       {
>         "2": "192.168.1.2"
>       }
>     ],

For index array, do you think if we need to add the index in the result
like upper example? Or we just omit the index and show it like:

    "arp-ip-target": [
      "192.168.1.1",
      "192.168.1.2"
    ],
    "ns-ip6-target": [
      "2001::1",
      "2001::2"
    ],

Thanks
Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ