diff --git a/gestion/whos.py b/gestion/whos.py index 4919fd1e..36b64cb5 100755 --- a/gestion/whos.py +++ b/gestion/whos.py @@ -489,7 +489,7 @@ def ipsec_ok(machine) : prefix = "ssh -i /usr/scripts/gestion/clef-encap root@ragnarok.crans.org " clients = globals()['clients_ipsec'] if clients == None: - clients = commands.getoutput("%snetstat -r -f encap | awk '($1 == \"0/0\") {print $3}'" % prefix).split("\n") + clients = [x.split("/")[0] for x in commands.getoutput("%snetstat -r -f encap | awk '($2 == \"0\") {print $6}'" % prefix).split("\n")] globals()['clients_ipsec'] = clients return machine.nom() in clients