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: <20250603035243.402806-1-wilder@us.ibm.com>
Date: Mon,  2 Jun 2025 20:51:46 -0700
From: David J Wilder <wilder@...ibm.com>
To: netdev@...r.kernel.org
Subject: [PATCH net-next v2 0/4] bonding: Extend arp_ip_target format to allow for a list of vlan tags.

The current implementation of the arp monitor builds a list of vlan-tags by
following the chain of net_devices above the bond. See: bond_verify_device_path().
Unfortunately with some configurations this is not possible. One example is
when an ovs switch is configured above the bond.

This change extends the "arp_ip_target" parameter format to allow for a list of
vlan tags to be included for each arp target. This new list of tags is optional
and may be omitted to preserve the current format and process of gathering tags.
When provided the list of tags circumvents the process of gathering tags by
using the supplied list. An empty list can be provided to simply skip the the
process of gathering tags.

The new optional format for arp_ip_target is:
arp_ip_target=ipv4-address[vlan-tag\...],...

Examples:
arp_ip_target=10.0.0.1,10.0.0.2 (Determine tags automatically for both targets)
arp_ip_target=10.0.0.1[]        (Don't add any tags, don't gather tags)
arp_ip_target=10.0.0.1[100/200] (Don't gather tags, use supplied list of tags)
arp_ip_target=10.0.0.1,10.0.0.2[100] (add vlan 100 tag for 10.0.0.2.
                                      Gather tags for 10.0.0.1.)

This set of patches updates the arp_ip_target functionality.

This new functional is yet to be included to the ns_ip6_target feature.

The iprout2 package will also need to be updated with the following change:


diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
index 19af67d0..b599cbae 100644
--- a/ip/iplink_bond.c
+++ b/ip/iplink_bond.c
@@ -242,9 +242,7 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
                                int i;
 
                                for (i = 0; target && i < BOND_MAX_ARP_TARGETS; i++) {
-                                       __u32 addr = get_addr32(target);
-
-                                       addattr32(n, 1024, i, addr);
+                                       addattrstrz(n, 1024, i, target);
                                        target = strtok(NULL, ",");
                                }
                                addattr_nest_end(n, nest);

Signed-off-by: David J Wilder <wilder@...ibm.com>

David J Wilder (4):
  bonding: Adding struct bond_arp_target
  bonding: Extend arp_ip_target format to allow for a list of vlan tags.
  bonding: Selftest for the arp_ip_target parameter.
  bonding: Update to the bonding documentation.

 Documentation/networking/bonding.rst          |  11 +
 drivers/net/bonding/bond_main.c               |  72 ++++---
 drivers/net/bonding/bond_netlink.c            |  16 +-
 drivers/net/bonding/bond_options.c            |  71 ++++---
 drivers/net/bonding/bond_procfs.c             |   7 +-
 drivers/net/bonding/bond_sysfs.c              |   9 +-
 include/net/bond_options.h                    |  20 ++
 include/net/bonding.h                         | 161 ++++++++++++++-
 .../selftests/drivers/net/bonding/Makefile    |   3 +-
 .../drivers/net/bonding/bond-arp-ip-target.sh | 194 ++++++++++++++++++
 10 files changed, 484 insertions(+), 80 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond-arp-ip-target.sh

-- 
2.43.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ