fix tc race
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 10s

This commit is contained in:
2026-03-07 15:49:57 +01:00
parent e73726fd1b
commit ec411610c8
2 changed files with 3 additions and 2 deletions

View File

@@ -81,8 +81,8 @@ for port in "${PORTS[@]}"; do
tc filter replace dev "$port" ingress pref 20 protocol all matchall action mirred egress mirror dev "$MIRROR_IF" tc filter replace dev "$port" ingress pref 20 protocol all matchall action mirred egress mirror dev "$MIRROR_IF"
done done
tc qdisc replace dev "$CAPTURE_IF" clsact tc qdisc replace dev "$MIRROR_IF" clsact
tc filter replace dev "$CAPTURE_IF" ingress pref 10 protocol all bpf direct-action obj "$CAPTURE_OBJ" sec classifier tc filter replace dev "$MIRROR_IF" egress pref 10 protocol all bpf direct-action obj "$CAPTURE_OBJ" sec classifier
cat <<EOF cat <<EOF
Bridge capture pipeline ready. Bridge capture pipeline ready.

View File

@@ -26,6 +26,7 @@ if [[ -n "$BRIDGE" ]] && ip link show "$BRIDGE" >/dev/null 2>&1; then
done < <(bridge link show master "$BRIDGE" | awk -F': ' '{print $2}' | awk '{print $1}') done < <(bridge link show master "$BRIDGE" | awk -F': ' '{print $2}' | awk '{print $1}')
fi fi
tc qdisc del dev "$MIRROR_IF" clsact 2>/dev/null || true
tc qdisc del dev "$CAPTURE_IF" clsact 2>/dev/null || true tc qdisc del dev "$CAPTURE_IF" clsact 2>/dev/null || true
if ip link show "$MIRROR_IF" >/dev/null 2>&1; then if ip link show "$MIRROR_IF" >/dev/null 2>&1; then