linux-stable/drivers/net/bonding
Hangbin Liu c4caa500ff bonding: guard ns_targets by CONFIG_IPV6
Guard ns_targets in struct bond_params by CONFIG_IPV6, which could save
256 bytes if IPv6 not configed. Also add this protection for function
bond_is_ip6_target_ok() and bond_get_targets_ip6().

Remove the IS_ENABLED() check for bond_opts[] as this will make
BOND_OPT_NS_TARGETS uninitialized if CONFIG_IPV6 not enabled. Add
a dummy bond_option_ns_ip6_targets_set() for this situation.

Fixes: 4e24be018e ("bonding: add new parameter ns_targets")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Jonathan Toppins <jtoppins@redhat.com>
Link: https://lore.kernel.org/r/20220531063727.224043-1-liuhangbin@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-06-01 11:18:55 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
bond_3ad.c bonding: fix data-races around agg_select_timer 2022-02-15 14:35:18 +00:00
bond_alb.c net: don't include ndisc.h from ipv6.h 2022-02-04 14:15:11 -08:00
bond_debugfs.c net: bonding: remove unnecessary braces 2021-05-20 15:43:24 -07:00
bond_main.c bonding: guard ns_targets by CONFIG_IPV6 2022-06-01 11:18:55 +02:00
bond_netlink.c bonding: NS target should accept link local address 2022-05-28 15:29:56 +01:00
bond_options.c bonding: guard ns_targets by CONFIG_IPV6 2022-06-01 11:18:55 +02:00
bond_procfs.c bonding: show NS IPv6 targets in proc master info 2022-05-31 10:50:02 +02:00
bond_sysfs.c Bonding: add arp_missed_max option 2021-11-30 12:15:58 +00:00
bond_sysfs_slave.c bonding: helper macro __ATTR_RO to make code more clear 2022-03-06 12:10:16 +00:00
bonding_priv.h drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00