X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=make-secnet-sites;h=5f271e3bc80731c27fe112d6b2c7c62191ae2bbc;hb=34059e315f755a35137cb8561eb25c4fc5597d7f;hp=a7f14de7dd883098e5a035d42d41f98cc665848c;hpb=c215a4bc817daf7b5631236c3c7b6a509479b034;p=secnet.git 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))