mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-01 18:39:37 +01:00
Correct ip_range handling of CIDR
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@617 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
753cf160e4
commit
f562fa4836
@ -2851,8 +2851,8 @@ get_routed_subnets() # $1 = interface name
|
|||||||
decodeaddr() {
|
decodeaddr() {
|
||||||
local x
|
local x
|
||||||
local temp=0
|
local temp=0
|
||||||
|
local ifs=$IFS
|
||||||
|
|
||||||
ifs=$IFS
|
|
||||||
IFS=.
|
IFS=.
|
||||||
|
|
||||||
for x in $1; do
|
for x in $1; do
|
||||||
@ -2882,6 +2882,18 @@ encodeaddr() {
|
|||||||
# Enumerate the members of an IP range
|
# Enumerate the members of an IP range
|
||||||
#
|
#
|
||||||
ip_range() {
|
ip_range() {
|
||||||
|
local first
|
||||||
|
local last
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
*-*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $1
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
first=`decodeaddr ${1%-*}`
|
first=`decodeaddr ${1%-*}`
|
||||||
last=`decodeaddr ${1#*-}`
|
last=`decodeaddr ${1#*-}`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user