From 025396078225831e1800a838a4310429e14055d1 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Thu, 5 Oct 2017 00:09:23 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20de=20la=20d=C3=A9tection=20d'ipv6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machines/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machines/views.py b/machines/views.py index 580ad4d8..c98936dc 100644 --- a/machines/views.py +++ b/machines/views.py @@ -1114,7 +1114,7 @@ def ouverture_ports(request): continue if i.ipv4: r['ipv4'][i.ipv4.ipv4] = {"tcp_in":[],"tcp_out":[],"udp_in":[],"udp_out":[]} - if i.ipv6: + if i.ipv6_object: r['ipv6'][i.ipv6] = {"tcp_in":[],"tcp_out":[],"udp_in":[],"udp_out":[]} for j in i.port_lists.all(): if i.ipv4: @@ -1122,7 +1122,7 @@ def ouverture_ports(request): r['ipv4'][i.ipv4.ipv4]["tcp_out"].extend(j.tcp_ports_out()) r['ipv4'][i.ipv4.ipv4]["udp_in"].extend(j.udp_ports_in()) r['ipv4'][i.ipv4.ipv4]["udp_out"].extend(j.udp_ports_out()) - if i.ipv6: + if i.ipv6_object: r['ipv6'][i.ipv6]["tcp_in"].extend(j.tcp_ports_in()) r['ipv6'][i.ipv6]["tcp_out"].extend(j.tcp_ports_out()) r['ipv6'][i.ipv6]["udp_in"].extend(j.udp_ports_in())