From 772613c32b4b2fe78fc132072cf391072334a26c Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 24 Aug 2017 02:41:08 -0400 Subject: [bug] flatten args to allow keepalive params --- src/leap/bitmask/vpn/helpers/linux/bitmask-root | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/leap/bitmask/vpn') diff --git a/src/leap/bitmask/vpn/helpers/linux/bitmask-root b/src/leap/bitmask/vpn/helpers/linux/bitmask-root index cad082be..19b1376e 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) -- cgit v1.2.3