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] [day] [month] [year] [list]
Message-ID: <20250916083418.7e94a93d@hermes.local>
Date: Tue, 16 Sep 2025 08:34:18 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: David Wilder <wilder@...ibm.com>
Cc: netdev@...r.kernel.org, jv@...sburgh.net, pradeeps@...ux.vnet.ibm.com,
 pradeep@...ibm.com, i.maximets@....org, amorenoz@...hat.com,
 haliu@...hat.com, dsahern@...il.com
Subject: Re: [PATCH iproute2-next v5 1/1] iproute: Extend bonding's
 "arp_ip_target" parameter to add vlan tags.

On Tue,  2 Sep 2025 14:15:52 -0700
David Wilder <wilder@...ibm.com> wrote:

> +			if (RTA_PAYLOAD(iptb[i]) > sizeof(data.addr)) {
> +				num = num + snprintf(&pbuf[num], size - num, "[");
> +
> +				for (level = 0;
> +				     data.vlans[level].vlan_proto != BOND_VLAN_PROTO_NONE;
> +				     level++) {
> +
> +					if (level > BOND_MAX_VLAN_TAGS) {
> +						fprintf(stderr,
> +							"Internal Error: too many vlan tags.\n");
> +						exit(1);
> +					}
> +
> +					if (level != 0)
> +						num = num + snprintf(&pbuf[num], size - num, "/");
> +
> +					num = num + snprintf(&pbuf[num], size - num,
> +							     "%u", data.vlans[level].vlan_id);
> +				}
> +
> +				num = num - snprintf(&pbuf[num], size - num, "]");
> +
> +			}
> +
> +			print_color_string(PRINT_ANY, COLOR_INET, NULL, "%s", pbuf);

This code will display multiple IP's as bracketed text if using JSON.
The more standard way of handling this in JSON would be to use an array.
Could you please rework the display logic to do that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ