chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
site: Make return value of transforms be an enum
[secnet.git]
/
make-secnet-sites
diff --git
a/make-secnet-sites
b/make-secnet-sites
index a7f14de7dd883098e5a035d42d41f98cc665848c..5f271e3bc80731c27fe112d6b2c7c62191ae2bbc 100755
(executable)
--- 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
#
# 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
# (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),
'networks':None,
'peer':None,
'pubkey':(lambda n,v:"key %s;\n"%v),
- 'address':(lambda n,v:"address %s;\n"%v),
'mobile':sp,
})
require_properties={
'mobile':sp,
})
require_properties={
@@
-381,13
+380,16
@@
def pline(i,allow_include=False):
current=nl
obstack.append(current)
return [i]
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 []
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))
complain("unknown keyword '%s'"%(keyword))