Commit 94abefc0 authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

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.
parent 0d1a11cc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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" );