From a1e2056ed39cfe628d5caf46644e4f7b450a802f Mon Sep 17 00:00:00 2001
From: Guillaume Valadon <guillaume@valadon.net>
Date: Wed, 28 Dec 2016 18:05:12 +0100
Subject: [PATCH] Wrong element accessed

---
 scapy/route6.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scapy/route6.py b/scapy/route6.py
index 4331e467..bbc61a60 100644
--- a/scapy/route6.py
+++ b/scapy/route6.py
@@ -105,7 +105,7 @@ class Route6:
         l = filter(lambda x: in6_ptop(x[0]) == dst and x[1] == plen, self.routes)
         if gw:
             gw = in6_ptop(gw)
-            l = filter(lambda x: in6_ptop(x[0]) == gw, self.routes)
+            l = filter(lambda x: in6_ptop(x[2]) == gw, self.routes)
         if len(l) == 0:
             warning("No matching route found")
         elif len(l) > 1:
-- 
GitLab