Skip creating forward rules if the input and the output device are the
same.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
# Create rules which are required to handle forwarded traffic.
for enabled_ips_zone_forward in "${enabled_ips_zones[@]}"; do
+ # Skip loop iteration if both zones are the same.
+ if [ "$enabled_ips_zone" -eq "$enabled_ips_zone_forward" ]; then
+ continue
+ fi
+
# Check if the whetelist file is not empty.
if [ -s "$WHITELIST_FILE" ]; then
# Create rules to handle whitelisted hosts.