forked from extern/shorewall_code
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:
parent
90b5b607a6
commit
510a35b46c
@ -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%%+*}
|
||||||
|
|
||||||
case $c in
|
while true; do
|
||||||
*.*.*.*)
|
case $c in
|
||||||
echo $c | sed 's/\./_/g'
|
*.*)
|
||||||
;;
|
c="${c%.*}_${c##*.}"
|
||||||
*.*)
|
;;
|
||||||
echo ${c%.*}_${c#*.}
|
*)
|
||||||
;;
|
echo ${c:=common}
|
||||||
*)
|
return
|
||||||
echo ${c:=common}
|
;;
|
||||||
;;
|
esac
|
||||||
esac
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user