ShellCheck - shell script analysis tool version: 0.10.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.4wU6R94jQS and /tmp/tmp.UQW1PRklPl Tree base: a09fb755e4fe ("mlxsw: spectrum: Forward packets with an IPv4 link-local source IP") Now at: d46c8d4dbeea ("selftest: forwarding: router: Add a test case for IPv4 link-local source IP") ====== Checking before the patch ====== Checking tools/testing/selftests/net/forwarding/router.sh - 6ec6f5b175b324172db1a4638244533aea7b3e351081e9089b85583110467fd3 In router.sh line 36: require_command $MCD ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: require_command "$MCD" In router.sh line 37: require_command $MC_CLI ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: require_command "$MC_CLI" In router.sh line 43: ip link set dev $h1 master vrf-h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h1" master vrf-h1 In router.sh line 46: ip link set dev $h1 up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h1" up In router.sh line 48: ip address add 192.0.2.2/24 dev $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 192.0.2.2/24 dev "$h1" In router.sh line 49: ip address add 2001:db8:1::2/64 dev $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 2001:db8:1::2/64 dev "$h1" In router.sh line 60: ip address del 2001:db8:1::2/64 dev $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 2001:db8:1::2/64 dev "$h1" In router.sh line 61: ip address del 192.0.2.2/24 dev $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 192.0.2.2/24 dev "$h1" In router.sh line 63: ip link set dev $h1 down ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h1" down In router.sh line 70: ip link set dev $h2 master vrf-h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h2" master vrf-h2 In router.sh line 73: ip link set dev $h2 up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h2" up In router.sh line 75: ip address add 198.51.100.2/24 dev $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 198.51.100.2/24 dev "$h2" In router.sh line 76: ip address add 2001:db8:2::2/64 dev $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 2001:db8:2::2/64 dev "$h2" In router.sh line 87: ip address del 2001:db8:2::2/64 dev $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 2001:db8:2::2/64 dev "$h2" In router.sh line 88: ip address del 198.51.100.2/24 dev $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 198.51.100.2/24 dev "$h2" In router.sh line 90: ip link set dev $h2 down ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h2" down In router.sh line 96: ip link set dev $rp1 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$rp1" up In router.sh line 97: ip link set dev $rp2 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$rp2" up In router.sh line 99: tc qdisc add dev $rp2 clsact ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc qdisc add dev "$rp2" clsact In router.sh line 101: ip address add 192.0.2.1/24 dev $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 192.0.2.1/24 dev "$rp1" In router.sh line 102: ip address add 2001:db8:1::1/64 dev $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 2001:db8:1::1/64 dev "$rp1" In router.sh line 104: ip address add 198.51.100.1/24 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 198.51.100.1/24 dev "$rp2" In router.sh line 105: ip address add 2001:db8:2::1/64 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 2001:db8:2::1/64 dev "$rp2" In router.sh line 110: ip address del 2001:db8:2::1/64 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 2001:db8:2::1/64 dev "$rp2" In router.sh line 111: ip address del 198.51.100.1/24 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 198.51.100.1/24 dev "$rp2" In router.sh line 113: ip address del 2001:db8:1::1/64 dev $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 2001:db8:1::1/64 dev "$rp1" In router.sh line 114: ip address del 192.0.2.1/24 dev $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 192.0.2.1/24 dev "$rp1" In router.sh line 116: tc qdisc del dev $rp2 clsact ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc qdisc del dev "$rp2" clsact In router.sh line 118: ip link set dev $rp2 down ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$rp2" down In router.sh line 119: ip link set dev $rp1 down ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$rp1" down In router.sh line 126: for ((i = 1; i <= $NUM_NETIFS; ++i)); do ^---------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In router.sh line 128: $SMCROUTEDIR/$table_name.conf ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$SMCROUTEDIR"/$table_name.conf In router.sh line 131: $MCD -N -I $table_name -f $SMCROUTEDIR/$table_name.conf \ ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MCD -N -I $table_name -f "$SMCROUTEDIR"/$table_name.conf \ In router.sh line 132: -P $SMCROUTEDIR/$table_name.pid ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -P "$SMCROUTEDIR"/$table_name.pid In router.sh line 137: pkill $MCD ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: pkill "$MCD" In router.sh line 138: rm -rf $SMCROUTEDIR ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -rf "$SMCROUTEDIR" In router.sh line 149: rp1mac=$(mac_get $rp1) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rp1mac=$(mac_get "$rp1") In router.sh line 181: ping_test $h1 198.51.100.2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ping_test "$h1" 198.51.100.2 In router.sh line 186: ping6_test $h1 2001:db8:2::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ping6_test "$h1" 2001:db8:2::2 In router.sh line 195: sysctl_set net.ipv4.conf.$rp1.rp_filter 0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl_set net.ipv4.conf."$rp1".rp_filter 0 In router.sh line 197: tc filter add dev $rp2 egress protocol ip pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol ip pref 1 handle 101 \ In router.sh line 200: $MZ $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ In router.sh line 201: -A 240.0.0.1 -b $rp1mac -B 198.51.100.2 -q ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -A 240.0.0.1 -b "$rp1mac" -B 198.51.100.2 -q In router.sh line 208: tc filter del dev $rp2 egress protocol ip pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol ip pref 1 handle 101 flower In router.sh line 209: sysctl_restore net.ipv4.conf.$rp1.rp_filter ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl_restore net.ipv4.conf."$rp1".rp_filter In router.sh line 218: local dest_ifs=${@} ^--^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. In router.sh line 220: $MC_CLI -I $table_name add $if_name $s_addr $mcast $dest_ifs ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MC_CLI -I "$table_name" add "$if_name" "$s_addr" "$mcast" "$dest_ifs" In router.sh line 228: local dest_ifs=${@} ^--^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. In router.sh line 230: $MC_CLI -I $table_name remove $if_name $s_addr $mcast $dest_ifs ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MC_CLI -I "$table_name" remove "$if_name" "$s_addr" "$mcast" "$dest_ifs" In router.sh line 244: tc filter add dev $rp2 egress protocol $proto pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol "$proto" pref 1 handle 101 \ In router.sh line 245: flower dst_ip $dip action pass ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: flower dst_ip "$dip" action pass In router.sh line 247: create_mcast_sg $rp1 $sip $dip $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_mcast_sg "$rp1" "$sip" "$dip" "$rp2" In router.sh line 249: $MZ $flags $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec -b $dmac \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$flags" "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec -b "$dmac" \ In router.sh line 250: -B $dip -q ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -B "$dip" -q In router.sh line 257: delete_mcast_sg $rp1 $sip $dip $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: delete_mcast_sg "$rp1" "$sip" "$dip" "$rp2" In router.sh line 258: tc filter del dev $rp2 egress protocol $proto pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol "$proto" pref 1 handle 101 flower In router.sh line 273: sysctl_set net.ipv4.conf.$rp1.rp_filter 0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl_set net.ipv4.conf."$rp1".rp_filter 0 In router.sh line 275: tc filter add dev $rp2 egress protocol ip pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol ip pref 1 handle 101 \ In router.sh line 278: $MZ $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ In router.sh line 279: -A 198.51.100.2 -b $rp1mac -B 198.51.100.2 -q ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -A 198.51.100.2 -b "$rp1mac" -B 198.51.100.2 -q In router.sh line 286: tc filter del dev $rp2 egress protocol ip pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol ip pref 1 handle 101 flower In router.sh line 287: sysctl_restore net.ipv4.conf.$rp1.rp_filter ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl_restore net.ipv4.conf."$rp1".rp_filter In router.sh line 295: tc filter add dev $rp2 egress protocol ipv6 pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol ipv6 pref 1 handle 101 \ In router.sh line 298: $MZ -6 $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ -6 "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ In router.sh line 299: -A 2001:db8:2::2 -b $rp1mac -B 2001:db8:2::2 -q ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -A 2001:db8:2::2 -b "$rp1mac" -B 2001:db8:2::2 -q In router.sh line 306: tc filter del dev $rp2 egress protocol ipv6 pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol ipv6 pref 1 handle 101 flower In router.sh line 315: tc filter add dev $rp2 egress protocol ip pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol ip pref 1 handle 101 \ In router.sh line 316: flower dst_ip $dip action pass ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: flower dst_ip "$dip" action pass In router.sh line 318: ip neigh add 169.254.1.1 lladdr 00:11:22:33:44:55 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip neigh add 169.254.1.1 lladdr 00:11:22:33:44:55 dev "$rp2" In router.sh line 319: ip route add 169.254.1.0/24 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip route add 169.254.1.0/24 dev "$rp2" In router.sh line 321: $MZ $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec -b $rp1mac -B $dip -q ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec -b "$rp1mac" -B "$dip" -q In router.sh line 328: ip route del 169.254.1.0/24 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip route del 169.254.1.0/24 dev "$rp2" In router.sh line 329: ip neigh del 169.254.1.1 lladdr 00:11:22:33:44:55 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip neigh del 169.254.1.1 lladdr 00:11:22:33:44:55 dev "$rp2" In router.sh line 330: tc filter del dev $rp2 egress protocol ip pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol ip pref 1 handle 101 flower In router.sh line 340: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" For more information: https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/forwarding/router.sh - 6ec6f5b175b324172db1a4638244533aea7b3e351081e9089b85583110467fd3 In router.sh line 39: require_command $MCD ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: require_command "$MCD" In router.sh line 40: require_command $MC_CLI ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: require_command "$MC_CLI" In router.sh line 46: ip link set dev $h1 master vrf-h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h1" master vrf-h1 In router.sh line 49: ip link set dev $h1 up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h1" up In router.sh line 51: ip address add 192.0.2.2/24 dev $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 192.0.2.2/24 dev "$h1" In router.sh line 52: ip address add 2001:db8:1::2/64 dev $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 2001:db8:1::2/64 dev "$h1" In router.sh line 63: ip address del 2001:db8:1::2/64 dev $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 2001:db8:1::2/64 dev "$h1" In router.sh line 64: ip address del 192.0.2.2/24 dev $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 192.0.2.2/24 dev "$h1" In router.sh line 66: ip link set dev $h1 down ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h1" down In router.sh line 73: ip link set dev $h2 master vrf-h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h2" master vrf-h2 In router.sh line 76: ip link set dev $h2 up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h2" up In router.sh line 78: ip address add 198.51.100.2/24 dev $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 198.51.100.2/24 dev "$h2" In router.sh line 79: ip address add 2001:db8:2::2/64 dev $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 2001:db8:2::2/64 dev "$h2" In router.sh line 90: ip address del 2001:db8:2::2/64 dev $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 2001:db8:2::2/64 dev "$h2" In router.sh line 91: ip address del 198.51.100.2/24 dev $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 198.51.100.2/24 dev "$h2" In router.sh line 93: ip link set dev $h2 down ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$h2" down In router.sh line 99: ip link set dev $rp1 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$rp1" up In router.sh line 100: ip link set dev $rp2 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$rp2" up In router.sh line 102: tc qdisc add dev $rp2 clsact ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc qdisc add dev "$rp2" clsact In router.sh line 104: ip address add 192.0.2.1/24 dev $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 192.0.2.1/24 dev "$rp1" In router.sh line 105: ip address add 2001:db8:1::1/64 dev $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 2001:db8:1::1/64 dev "$rp1" In router.sh line 107: ip address add 198.51.100.1/24 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 198.51.100.1/24 dev "$rp2" In router.sh line 108: ip address add 2001:db8:2::1/64 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address add 2001:db8:2::1/64 dev "$rp2" In router.sh line 113: ip address del 2001:db8:2::1/64 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 2001:db8:2::1/64 dev "$rp2" In router.sh line 114: ip address del 198.51.100.1/24 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 198.51.100.1/24 dev "$rp2" In router.sh line 116: ip address del 2001:db8:1::1/64 dev $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 2001:db8:1::1/64 dev "$rp1" In router.sh line 117: ip address del 192.0.2.1/24 dev $rp1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip address del 192.0.2.1/24 dev "$rp1" In router.sh line 119: tc qdisc del dev $rp2 clsact ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc qdisc del dev "$rp2" clsact In router.sh line 121: ip link set dev $rp2 down ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$rp2" down In router.sh line 122: ip link set dev $rp1 down ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set dev "$rp1" down In router.sh line 129: for ((i = 1; i <= $NUM_NETIFS; ++i)); do ^---------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In router.sh line 131: $SMCROUTEDIR/$table_name.conf ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$SMCROUTEDIR"/$table_name.conf In router.sh line 134: $MCD -N -I $table_name -f $SMCROUTEDIR/$table_name.conf \ ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MCD -N -I $table_name -f "$SMCROUTEDIR"/$table_name.conf \ In router.sh line 135: -P $SMCROUTEDIR/$table_name.pid ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -P "$SMCROUTEDIR"/$table_name.pid In router.sh line 140: pkill $MCD ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: pkill "$MCD" In router.sh line 141: rm -rf $SMCROUTEDIR ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -rf "$SMCROUTEDIR" In router.sh line 152: rp1mac=$(mac_get $rp1) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rp1mac=$(mac_get "$rp1") In router.sh line 184: ping_test $h1 198.51.100.2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ping_test "$h1" 198.51.100.2 In router.sh line 189: ping6_test $h1 2001:db8:2::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ping6_test "$h1" 2001:db8:2::2 In router.sh line 198: sysctl_set net.ipv4.conf.$rp1.rp_filter 0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl_set net.ipv4.conf."$rp1".rp_filter 0 In router.sh line 200: tc filter add dev $rp2 egress protocol ip pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol ip pref 1 handle 101 \ In router.sh line 203: $MZ $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ In router.sh line 204: -A 240.0.0.1 -b $rp1mac -B 198.51.100.2 -q ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -A 240.0.0.1 -b "$rp1mac" -B 198.51.100.2 -q In router.sh line 211: tc filter del dev $rp2 egress protocol ip pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol ip pref 1 handle 101 flower In router.sh line 212: sysctl_restore net.ipv4.conf.$rp1.rp_filter ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl_restore net.ipv4.conf."$rp1".rp_filter In router.sh line 221: local dest_ifs=${@} ^--^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. In router.sh line 223: $MC_CLI -I $table_name add $if_name $s_addr $mcast $dest_ifs ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MC_CLI -I "$table_name" add "$if_name" "$s_addr" "$mcast" "$dest_ifs" In router.sh line 231: local dest_ifs=${@} ^--^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. In router.sh line 233: $MC_CLI -I $table_name remove $if_name $s_addr $mcast $dest_ifs ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MC_CLI -I "$table_name" remove "$if_name" "$s_addr" "$mcast" "$dest_ifs" In router.sh line 247: tc filter add dev $rp2 egress protocol $proto pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol "$proto" pref 1 handle 101 \ In router.sh line 248: flower dst_ip $dip action pass ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: flower dst_ip "$dip" action pass In router.sh line 250: create_mcast_sg $rp1 $sip $dip $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_mcast_sg "$rp1" "$sip" "$dip" "$rp2" In router.sh line 252: $MZ $flags $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec -b $dmac \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$flags" "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec -b "$dmac" \ In router.sh line 253: -B $dip -q ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -B "$dip" -q In router.sh line 260: delete_mcast_sg $rp1 $sip $dip $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: delete_mcast_sg "$rp1" "$sip" "$dip" "$rp2" In router.sh line 261: tc filter del dev $rp2 egress protocol $proto pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol "$proto" pref 1 handle 101 flower In router.sh line 276: sysctl_set net.ipv4.conf.$rp1.rp_filter 0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl_set net.ipv4.conf."$rp1".rp_filter 0 In router.sh line 278: tc filter add dev $rp2 egress protocol ip pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol ip pref 1 handle 101 \ In router.sh line 281: $MZ $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ In router.sh line 282: -A 198.51.100.2 -b $rp1mac -B 198.51.100.2 -q ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -A 198.51.100.2 -b "$rp1mac" -B 198.51.100.2 -q In router.sh line 289: tc filter del dev $rp2 egress protocol ip pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol ip pref 1 handle 101 flower In router.sh line 290: sysctl_restore net.ipv4.conf.$rp1.rp_filter ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl_restore net.ipv4.conf."$rp1".rp_filter In router.sh line 298: tc filter add dev $rp2 egress protocol ipv6 pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol ipv6 pref 1 handle 101 \ In router.sh line 301: $MZ -6 $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ -6 "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec \ In router.sh line 302: -A 2001:db8:2::2 -b $rp1mac -B 2001:db8:2::2 -q ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -A 2001:db8:2::2 -b "$rp1mac" -B 2001:db8:2::2 -q In router.sh line 309: tc filter del dev $rp2 egress protocol ipv6 pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol ipv6 pref 1 handle 101 flower In router.sh line 318: tc filter add dev $rp2 egress protocol ip pref 1 handle 101 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter add dev "$rp2" egress protocol ip pref 1 handle 101 \ In router.sh line 319: flower dst_ip $dip action pass ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: flower dst_ip "$dip" action pass In router.sh line 321: ip neigh add 169.254.1.1 lladdr 00:11:22:33:44:55 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip neigh add 169.254.1.1 lladdr 00:11:22:33:44:55 dev "$rp2" In router.sh line 322: ip route add 169.254.1.0/24 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip route add 169.254.1.0/24 dev "$rp2" In router.sh line 324: $MZ $h1 -t udp "sp=54321,dp=12345" -c 5 -d 1msec -b $rp1mac -B $dip -q ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $MZ "$h1" -t udp "sp=54321,dp=12345" -c 5 -d 1msec -b "$rp1mac" -B "$dip" -q In router.sh line 331: ip route del 169.254.1.0/24 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip route del 169.254.1.0/24 dev "$rp2" In router.sh line 332: ip neigh del 169.254.1.1 lladdr 00:11:22:33:44:55 dev $rp2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip neigh del 169.254.1.1 lladdr 00:11:22:33:44:55 dev "$rp2" In router.sh line 333: tc filter del dev $rp2 egress protocol ip pref 1 handle 101 flower ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tc filter del dev "$rp2" egress protocol ip pref 1 handle 101 flower In router.sh line 363: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" For more information: https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti...