Validate the interfaces in the hosts file

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@96 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2002-06-28 23:42:00 +00:00
parent e7b13df2ef
commit 6b8a9b8ddf

View File

@ -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 #
################################################################################