diff options
author | Kali Kaneko <kali@leap.se> | 2017-08-24 02:41:08 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-30 16:18:09 -0400 |
commit | 772613c32b4b2fe78fc132072cf391072334a26c (patch) | |
tree | ddab4c13ea925eeb95025d55ad1319261df51b53 /src/leap/bitmask/vpn/helpers/linux | |
parent | 26e2727d48b47a3d7328f43fe5495d4bfee620c0 (diff) |
[bug] flatten args to allow keepalive params
Diffstat (limited to 'src/leap/bitmask/vpn/helpers/linux')
-rwxr-xr-x | src/leap/bitmask/vpn/helpers/linux/bitmask-root | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/helpers/linux/bitmask-root b/src/leap/bitmask/vpn/helpers/linux/bitmask-root index cad082b..19b1376 100755 --- a/src/leap/bitmask/vpn/helpers/linux/bitmask-root +++ b/src/leap/bitmask/vpn/helpers/linux/bitmask-root @@ -352,7 +352,9 @@ def parse_openvpn_flags(args): result.append(flag_name) required_params = ALLOWED_FLAGS[flag_name] if required_params: - flag_params = flag[1:] + # flatten if separated by spaces + flag_params = [i for sublist in map( + lambda s: s.split(), flag[1:]) for i in sublist] if len(flag_params) != len(required_params): log("%s: ERROR: not enough params for %s" % (SCRIPT, flag_name)) @@ -937,7 +939,8 @@ def main(): elif command == "firewall_isup": if ipv4_chain_exists(BITMASK_CHAIN): - log("%s: INFO: bitmask firewall is up" % (SCRIPT,)) + # too verbose since bitmask polls this + pass else: bail("INFO: bitmask firewall is down") @@ -970,5 +973,4 @@ def main(): if __name__ == "__main__": debug(" ".join(sys.argv)) main() - log("done") exit(0) |