Allow chains with IP addresses as names -- improved version

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@722 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2003-08-21 14:48:49 +00:00
parent 90b5b607a6
commit 510a35b46c

View File

@ -381,23 +381,23 @@ ip_vlsm() {
# #
# Chain name base for an interface # Chain name base for an interface -- remove all periods from the passed name.
# #
chain_base() #$1 = interface chain_base() #$1 = interface
{ {
local c=${1%%+*} local c=${1%%+*}
while true; do
case $c in case $c in
*.*.*.*)
echo $c | sed 's/\./_/g'
;;
*.*) *.*)
echo ${c%.*}_${c#*.} c="${c%.*}_${c##*.}"
;; ;;
*) *)
echo ${c:=common} echo ${c:=common}
return
;; ;;
esac esac
done
} }
# #