summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-10 21:09:33 +0200
committerGitHub <noreply@github.com>2020-04-10 21:09:33 +0200
commit2c8c3117093b4e975461c2cf1c15a0d7fc4654cf (patch)
tree232be54c6fedd28044c0f9304ed7f327a4fc663a /src
parent881a9b679316b2a2e6d035a8bcb0936cb3415b71 (diff)
parent5e61b09a5d0ad4d4cfd25eafcc95f0d2b1a927b9 (diff)
downloadvyos-1x-2c8c3117093b4e975461c2cf1c15a0d7fc4654cf.tar.gz
vyos-1x-2c8c3117093b4e975461c2cf1c15a0d7fc4654cf.zip
Merge pull request #324 from DmitriyEshenko/fix-res-ra
pptp: l2tp: T2262: Fix call to function run()
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/reset_vpn.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/op_mode/reset_vpn.py b/src/op_mode/reset_vpn.py
index 8962df212..15908ee77 100755
--- a/src/op_mode/reset_vpn.py
+++ b/src/op_mode/reset_vpn.py
@@ -30,41 +30,40 @@ def terminate_sessions(username='', interface='', protocol=''):
if username == "all_users":
if protocol == "pptp":
pptp_cmd = pptp_base.format('all','')
- run(pptp_cmd, stdout=DEVNULL, stderr=DEVNULL)
+ run(pptp_cmd)
return
elif protocol == "l2tp":
l2tp_cmd = l2tp_base.format('all', '')
- run(l2tp_cmd, stdout=DEVNULL, stderr=DEVNULL)
+ run(l2tp_cmd)
return
else:
pptp_cmd = pptp_base.format('all', '')
- run(pptp_cmd, stdout=DEVNULL, stderr=DEVNULL)
+ run(pptp_cmd)
l2tp_cmd = l2tp_base.format('all', '')
- run(l2tp_cmd, stdout=DEVNULL, stderr=DEVNULL)
+ run(l2tp_cmd)
return
if protocol == "pptp":
pptp_cmd = pptp_base.format('username', username)
- run(pptp_cmd, stdout=DEVNULL, stderr=DEVNULL)
+ run(pptp_cmd)
return
elif protocol == "l2tp":
l2tp_cmd = l2tp_base.format('username', username)
- run(l2tp_cmd, stdout=DEVNULL, stderr=DEVNULL)
+ run(l2tp_cmd)
return
else:
pptp_cmd = pptp_base.format('username', username)
- run(pptp_cmd, stdout=DEVNULL, stderr=DEVNULL)
- l2tp_cmd.append("terminate username {0}".format(username))
- run(l2tp_cmd, stdout=DEVNULL, stderr=DEVNULL)
+ run(pptp_cmd)
+ l2tp_cmd = l2tp_base.format('username', username)
+ run(l2tp_cmd)
return
# rewrite `terminate by interface` if pptp will have pptp%d interface naming
if interface:
pptp_cmd = pptp_base.format('if', interface)
- run(pptp_cmd, stdout=DEVNULL, stderr=DEVNULL)
+ run(pptp_cmd)
l2tp_cmd = l2tp_base.format('if', interface)
- run(l2tp_cmd, stdout=DEVNULL, stderr=DEVNULL)
-
+ run(l2tp_cmd)
def main():
#parese args