On Tue, Sep 23, 2025 at 10:32:22AM +0200, Paolo Abeni wrote:
+lib_dir=$(dirname "$0") +source "$lib_dir"/../../../net/lib.sh +algo="aead rfc4106(gcm(aes)) 0x3132333435363738393031323334353664636261 128" +srcip=192.0.2.1 +dstip=192.0.2.2 +ipsec0=/sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec +ipsec1=/sys/kernel/debug/netdevsim/netdevsim0/ports/1/ipsec +active_slave=""
+active_slave_changed() +{
local old_active_slave=$1
local new_active_slave=$(ip -n ${ns} -d -j link show bond0 | \
jq -r ".[].linkinfo.info_data.active_slave")
shell check is not super happy about the lack of double quotes around the variables (above and many places below) and about declaring the variable and assigning it to a subshell in the same statement.
I think it's better to address such warnings for consistency.
Ah, this is a patch I wrote some times ago. I forgot to re-format it with shellcheck. I will fix the warnings.
Thanks hangbin