Selaa lähdekoodia

ff_check_gateway: Ignore any external BATMAN instance, if present.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 7 vuotta sitten
vanhempi
commit
6288f57cb7
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      batman/ff_check_gateway

+ 5 - 0
batman/ff_check_gateway

@@ -23,6 +23,11 @@ fi
 # any meshable interface.
 shopt -s nullglob
 for mesh_int in /sys/class/net/*/mesh; do
+	# Ignore any external BATMAN instance, if present
+	if echo "${mesh_int}" | grep -q '-ext$'; then
+		continue
+	fi
+
 	old_state="$(cat ${mesh_int}/gw_mode)"
 	[ "$old_state" == "$new_state" ] && continue