X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/c215a4bc817daf7b5631236c3c7b6a509479b034..HEAD:/make-secnet-sites diff --git a/make-secnet-sites b/make-secnet-sites index a7f14de..5f271e3 100755 --- a/make-secnet-sites +++ b/make-secnet-sites @@ -5,7 +5,7 @@ # # secnet is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version d of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # secnet is distributed in the hope that it will be useful, but @@ -267,7 +267,6 @@ class sitelevel(level): 'networks':None, 'peer':None, 'pubkey':(lambda n,v:"key %s;\n"%v), - 'address':(lambda n,v:"address %s;\n"%v), 'mobile':sp, }) require_properties={ @@ -381,13 +380,16 @@ def pline(i,allow_include=False): current=nl obstack.append(current) return [i] - if current.allow_properties.has_key(keyword): - set_property(current,w) - return [i] - else: + if not current.allow_properties.has_key(keyword): complain("Property %s not allowed at %s level"% (keyword,current.type)) return [] + elif current.depth == vpnlevel.depth < allow_defs: + complain("Not allowed to set VPN properties here") + return [] + else: + set_property(current,w) + return [i] complain("unknown keyword '%s'"%(keyword))