diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index b909113ff..40bef0610 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -4,6 +4,8 @@ Changes in 3.4.0 Final 2) Fix route_rules processing. +3) Fix restoration of ip range dynamic entries. + Changes in 3.4.0 RC 2 1) No longer include params file in compiled output. diff --git a/Shorewall/compiler b/Shorewall/compiler index b2933cddc..e99437518 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -5352,10 +5352,18 @@ __EOF__ if [ -f \${VARDIR}/save ]; then progress_message2 "Setting up dynamic rules..." - while read target ignore1 ignore2 address rest; do + rangematch='source IP range' + while read target ignore1 ignore2 address ignore3 rest; do case \$target in DROP|reject|logdrop|logreject) - run_iptables -A dynamic -s \$address -j \$target + case \$rest in + \$rangematch*) + run_iptables -A dynamic -m iprange --src-range \${rest#source IP range} + ;; + *) + run_iptables -A dynamic -s \$address -j \$target + ;; + esac ;; esac done < \${VARDIR}/save