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>] [day] [month] [year] [list]
Message-Id: <20250629115212.95397-1-tonghao@bamaicloud.com>
Date: Sun, 29 Jun 2025 19:52:12 +0800
From: Tonghao Zhang <tonghao@...aicloud.com>
To: netdev@...r.kernel.org
Cc: Tonghao Zhang <tonghao@...aicloud.com>,
	Stephen Hemminger <stephen@...workplumber.org>,
	David Ahern <dsahern@...il.com>
Subject: [PATCH iproute2-next] ip/bond: add broadcast_neighbor support

This option has no effect in modes other than 802.3ad mode.
When this option enabled, the bond device will broadcast ARP/ND
packets to all active slaves.

Cc: Stephen Hemminger <stephen@...workplumber.org>
Cc: David Ahern <dsahern@...il.com>
Signed-off-by: Tonghao Zhang <tonghao@...aicloud.com>
---
no update uapi header: https://marc.info/?l=linux-netdev&m=170614774224160&w=3
net-next patch: https://patchwork.kernel.org/project/netdevbpf/patch/84d0a044514157bb856a10b6d03a1028c4883561.1751031306.git.tonghao@bamaicloud.com/
---
 ip/iplink_bond.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
index a964f547..b1b144fb 100644
--- a/ip/iplink_bond.c
+++ b/ip/iplink_bond.c
@@ -149,6 +149,7 @@ static void print_explain(FILE *f)
 		"                [ lacp_rate LACP_RATE ]\n"
 		"                [ lacp_active LACP_ACTIVE]\n"
 		"                [ coupled_control COUPLED_CONTROL ]\n"
+		"                [ broadcast_neighbor BROADCAST_NEIGHBOR ]\n"
 		"                [ ad_select AD_SELECT ]\n"
 		"                [ ad_user_port_key PORTKEY ]\n"
 		"                [ ad_actor_sys_prio SYSPRIO ]\n"
@@ -165,6 +166,7 @@ static void print_explain(FILE *f)
 		"LACP_RATE := slow|fast\n"
 		"AD_SELECT := stable|bandwidth|count\n"
 		"COUPLED_CONTROL := off|on\n"
+		"BROADCAST_NEIGHBOR := off|on\n"
 	);
 }

@@ -184,6 +186,7 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
 	__u32 arp_all_targets, resend_igmp, min_links, lp_interval;
 	__u32 packets_per_slave;
 	__u8 missed_max;
+	__u8 broadcast_neighbor;
 	unsigned int ifindex;
 	int ret;

@@ -376,6 +379,12 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
 			if (ret)
 				return ret;
 			addattr8(n, 1024, IFLA_BOND_COUPLED_CONTROL, coupled_control);
+		} else if (strcmp(*argv, "broadcast_neighbor") == 0) {
+			NEXT_ARG();
+			broadcast_neighbor = parse_on_off("broadcast_neighbor", *argv, &ret);
+			if (ret)
+				return ret;
+			addattr8(n, 1024, IFLA_BOND_BROADCAST_NEIGH, broadcast_neighbor);
 		} else if (matches(*argv, "ad_select") == 0) {
 			NEXT_ARG();
 			if (get_index(ad_select_tbl, *argv) < 0)
@@ -675,6 +684,13 @@ static void bond_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 			     rta_getattr_u8(tb[IFLA_BOND_COUPLED_CONTROL]));
 	}

+	if (tb[IFLA_BOND_BROADCAST_NEIGH]) {
+		print_on_off(PRINT_ANY,
+			     "broadcast_neighbor",
+			     "broadcast_neighbor %s ",
+			     rta_getattr_u8(tb[IFLA_BOND_BROADCAST_NEIGH]));
+	}
+
 	if (tb[IFLA_BOND_AD_SELECT]) {
 		const char *ad_select = get_name(ad_select_tbl,
 						 rta_getattr_u8(tb[IFLA_BOND_AD_SELECT]));
--
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ