network: Fix bridge interface not properly detected

This commit is contained in:
tschettervictor
2025-02-26 14:59:44 -07:00
committed by GitHub
parent 2c470c0fcf
commit 513e7777ff

View File

@@ -421,7 +421,7 @@ case "${ACTION}" in
fi
fi
elif [ "${BRIDGE_VNET_JAIL}" -eq 1 ]; then
if ! ifconfig | grep "${INTERFACE}" | grep -q bridge; then
if ! ifconfig -g bridge | grep -owq "${INTERFACE}"; then
error_exit "\"${INTERFACE}\" is not a bridge interface."
else
add_interface "${TARGET}" "${INTERFACE}" "${IP}"