From 94abefc00bb22b93493831798391d5d5b21f9d4c Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Mon, 15 Mar 2021 18:35:23 +0100 Subject: [PATCH] Filter: Update 'gw' to handle IPv6 link-local addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a link-local address is set, use the existing iface for scope. Thanks to Marcel Krüger for the bugreport. --- filter/f-inst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/filter/f-inst.c b/filter/f-inst.c index 5cae31ba..1378fe4a 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -559,7 +559,8 @@ case SA_GW: { ip_addr ip = v1.val.ip; - neighbor *n = neigh_find(rta->src->proto, ip, NULL, 0); + struct iface *ifa = ipa_is_link_local(ip) ? rta->nh.iface : NULL; + neighbor *n = neigh_find(rta->src->proto, ip, ifa, 0); if (!n || (n->scope == SCOPE_HOST)) runtime( "Invalid gw address" );