We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4afdcba commit 655c65eCopy full SHA for 655c65e
modules.d/95nvmf/parse-nvmf-boot-connections.sh
@@ -40,15 +40,15 @@ validate_ip_conn() {
40
return 1
41
fi
42
43
- ifname=$(ip -o route get to "$local_address" | sed -n 's/.*dev \([^ ]*\).*/\1/p')
+ ifname=$(ip -o route get from "$local_address" to "$traddr" | sed -n 's/.*dev \([^ ]*\).*/\1/p')
44
45
- if ip l show "$ifname" > /dev/null 2>&1; then
+ if ! ip l show "$ifname" > /dev/null 2>&1; then
46
warn "invalid network interface $ifname"
47
48
49
50
# confirm there's a route to destination
51
- if ip route get "$traddr" > /dev/null 2>&1; then
+ if ! ip route get "$traddr" > /dev/null 2>&1; then
52
warn "no route to $traddr"
53
54
0 commit comments