]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Filter: Update 'gw' to handle IPv6 link-local addresses
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Mon, 15 Mar 2021 17:35:23 +0000 (18:35 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Mon, 15 Mar 2021 17:37:18 +0000 (18:37 +0100)
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

index 5cae31ba153d05193ef3cad0a84232795871c200..1378fe4a499f360463b1a7697937b216e6c7a789 100644 (file)
       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" );