sys.path.append("/usr/share/secnet")
import ipaddr
-VERSION="0.1.9"
+VERSION="0.1.10"
class vpn:
def __init__(self,name):
i=sc.intersection(self.set)
return i.is_empty()
def out(self):
- rn=''
- if (self.w[0]=='restrict-nets'): rn='# '
- return '%s%s %s;'%(rn,self.w[0],
- string.join(map(lambda x:'"%s/%s"'%(x.ip_str(),
+ if (self.w[0]=='restrict-nets'): pattern="# restrict-nets %s;"
+ else:
+ pattern="link netlink { routes %s; };"
+ return pattern%string.join(map(lambda x:'"%s/%s"'%(x.ip_str(),
x.mask.netmask_bits_str),
- self.set.as_list_of_networks()),","))
+ self.set.as_list_of_networks()),",")
class dhgroup:
def __init__(self,w):