X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=inline;f=ipif%2Fudptunnel-reconf.pl;h=ea4c86f0d337f80ce7d29921bb90eeee9f1473be;hb=1c18e501b40154a3caeda9f0c8962ffe708bf1b2;hp=7fd14bc59643fe360cb6885b2fe2cddf2fd185ca;hpb=94808710d2f7eda4f4e114a2a138f473ad832703;p=userv-utils.git diff --git a/ipif/udptunnel-reconf.pl b/ipif/udptunnel-reconf.pl index 7fd14bc..ea4c86f 100755 --- a/ipif/udptunnel-reconf.pl +++ b/ipif/udptunnel-reconf.pl @@ -94,14 +94,6 @@ sub parse_addr_mask ($) { return ($iaddr, $mask); } -$forbid_remote= var_global('forbid_remote'); -@forbid_remote= (); -if ($forbid_remote ne '-') { - foreach $r (split /[, \t]+/, $forbid_remote) { - push @forbid_remote, [ parse_addr_mask($r) ]; - } -} - sub ipif_permit ($$$$) { my ($group,$local,$net,$why) = @_; my ($pmask,$piaddr,$fmask,$fiaddr,@lgroup,$lgid); @@ -133,6 +125,14 @@ if ($glend !~ m/^V_/ && $glgroup !~ m/^V_/ && } foreach $site (@actives, @passives) { + $forbid_remote= var_site('forbid_remote'); + @forbid_remote= (); + if ($forbid_remote ne '-') { + foreach $r (split /[, \t]+/, $forbid_remote) { + push @forbid_remote, [ parse_addr_mask($r) ]; + } + } + $tlend= var_site('lend')."/32"; $tlgroup= var_site('lgroup'); if ($tlend ne $glend || $tlgroup ne $glgroup) {