From 6b8a9b8ddf4d08da07ce907d40fe29971e010f9b Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 28 Jun 2002 23:42:00 +0000 Subject: [PATCH] Validate the interfaces in the hosts file git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@96 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 3be36ef6f..48a961b39 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -472,6 +472,11 @@ validate_hosts_file() { r="$z $hosts $options" validate_zone $z || startup_error "Invalid zone ($z) in record \"$r\"" + interface=${hosts%:*} + + list_search $interface $all_interfaces || \ + startup_error "Unknown interface ($interface) in record \"$r\"" + for option in `separate_list $options`; do case $option in routestopped|-) @@ -1370,7 +1375,8 @@ delete_tc() # dest_interface = Destination Interface Specification # # proto = Protocol Specification # # addr = Original Destination Address # -# dports = Destination Port Specification # +# dports = Destination Port Specification. 'dports' may be changed # +# by this function # # cport = Source Port Specification # # multioption = String to invoke multiport match if appropriate # ################################################################################