From: Ondrej Zajicek (work) Date: Mon, 15 Mar 2021 17:35:23 +0000 (+0100) Subject: Filter: Update 'gw' to handle IPv6 link-local addresses X-Git-Tag: v2.0.8~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94abefc00bb22b93493831798391d5d5b21f9d4c;p=thirdparty%2Fbird.git Filter: Update 'gw' to handle IPv6 link-local addresses When a link-local address is set, use the existing iface for scope. Thanks to Marcel Krüger for the bugreport. --- diff --git a/filter/f-inst.c b/filter/f-inst.c index 5cae31ba1..1378fe4a4 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" );