mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-15 10:51:02 +01:00
Replace multiplication by bit shift in decodeaddr()
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@616 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
d541d73549
commit
753cf160e4
@ -2856,7 +2856,7 @@ decodeaddr() {
|
||||
IFS=.
|
||||
|
||||
for x in $1; do
|
||||
temp=$(( $temp * 256 + $x ))
|
||||
temp=$(( $(( $temp << 8 )) | $x ))
|
||||
done
|
||||
|
||||
echo $temp
|
||||
|
@ -25,4 +25,4 @@ New Features:
|
||||
|
||||
Example:
|
||||
|
||||
DNAT net loc:192.168.10.2-192.168.10.5 tcp 80
|
||||
DNAT net loc:192.168.10.2-192.168.10.5 tcp 80
|
Loading…
Reference in New Issue
Block a user