diff --git a/scapy/route6.py b/scapy/route6.py index 4331e467f93d52abeb539cc196d88a385a19090b..bbc61a6038e2d88cbbf0450afa0ae267ef374cc0 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: