diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-03-15 18:35:23 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-03-15 18:37:18 +0100 |
commit | 94abefc00bb22b93493831798391d5d5b21f9d4c (patch) | |
tree | 5dbfe6859efa48c0719f4508c9a3f5e8faf847e0 | |
parent | 0d1a11cca3136828808b8e73f4d5e547cc787fb8 (diff) |
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.
-rw-r--r-- | filter/f-inst.c | 3 |
1 files changed, 2 insertions, 1 deletions
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" ); |