chiark / gitweb /
@@ -3,6 +3,7 @@
[userv-utils.git] / ipif / udptunnel-reconf.pl
index 7fd14bc59643fe360cb6885b2fe2cddf2fd185ca..ea4c86f0d337f80ce7d29921bb90eeee9f1473be 100755 (executable)
@@ -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) {