From c44cb44f7c02c30670584a5e8ed90c37e6709fba Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 9 Nov 2002 15:56:29 +0000 Subject: [PATCH] Verify interface names in the SOURCE column of /etc/shorewall/tcrules git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@318 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 64647672a..b44f429ae 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -1569,18 +1569,22 @@ process_tc_rule() if [ "x$source" != "x-" ]; then case $source in - *.*.*) - r="-s $source " - ;; - ~*) - r=`mac_match $source` - ;; - $FW) - chain=tcout - ;; - *) - r="-i $source " - ;; + *.*.*) + r="-s $source " + ;; + ~*) + r=`mac_match $source` + ;; + $FW) + chain=tcout + ;; + *) + if ! list_search $source $all_interfaces; then + fatal_error "Error: Unknown interface $source" + fi + + r="-i $source " + ;; esac fi [ "x$dest" = "x-" ] || r="${r}-d $dest "