summaryrefslogtreecommitdiff
path: root/include/net/bonding.h
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2022-02-21 13:54:57 +0800
committerDavid S. Miller <davem@davemloft.net>2022-02-21 12:13:45 +0000
commit129e3c1bab24d27d0fa6e505a472345a92d7a2b0 (patch)
tree62198f35e14e68f84fa91de91c27d7a3dbe3d339 /include/net/bonding.h
parent4e24be018eb9dbcefa4b01c07e298b147dc1a4d7 (diff)
bonding: add new option ns_ip6_target
This patch add a new bonding option ns_ip6_target, which correspond to the arp_ip_target. With this we set IPv6 targets and send IPv6 NS request to determine the health of the link. For other related options like the validation, we still use arp_validate, and will change to ns_validate later. Note: the sysfs configuration support was removed based on https://lore.kernel.org/netdev/8863.1645071997@famine Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/bonding.h')
-rw-r--r--include/net/bonding.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/bonding.h b/include/net/bonding.h
index f3b986f6b6e4..d0dfe727e0b1 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -503,6 +503,13 @@ static inline int bond_is_ip_target_ok(__be32 addr)
return !ipv4_is_lbcast(addr) && !ipv4_is_zeronet(addr);
}
+static inline int bond_is_ip6_target_ok(struct in6_addr *addr)
+{
+ return !ipv6_addr_any(addr) &&
+ !ipv6_addr_loopback(addr) &&
+ !ipv6_addr_is_multicast(addr);
+}
+
/* Get the oldest arp which we've received on this slave for bond's
* arp_targets.
*/