mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
VPN: IPsec: Security Policy Database - refactor to MVC and extend functionality.
missed a spot in the previous commit, make sure we're not omitting host entries as they skip a subnet definition
This commit is contained in:
parent
057fe2e7d2
commit
023d8e4a35
@ -39,7 +39,7 @@ if __name__ == '__main__':
|
||||
for line in sp.stdout.split("\n"):
|
||||
line_no += 1
|
||||
parts = line.split()
|
||||
if not line.startswith("\t") and line.count('/') == 2:
|
||||
if not line.startswith("\t") and len(parts) > 2:
|
||||
line_no = 0
|
||||
spec_line = line.strip()
|
||||
spd_rec = {
|
||||
|
||||
@ -40,7 +40,7 @@ if __name__ == '__main__':
|
||||
sp = subprocess.run(['/sbin/setkey', '-DP'], capture_output=True, text=True)
|
||||
spec_line = None
|
||||
for line in sp.stdout.split("\n"):
|
||||
if not line.startswith("\t") and line.count('/') == 2:
|
||||
if not line.startswith("\t") and len(line.split()) > 2:
|
||||
spec_line = line.strip()
|
||||
elif spec_line:
|
||||
ident = "%s %s" % (spec_line, line.strip().split()[0])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user