Don't send RAs on interfaces without a link-local address.

Since the source address of the RAs must be the link-local address.
This commit is contained in:
Simon Kelley
2020-01-05 17:23:19 +00:00
parent 2a8710ac2f
commit 378fa56888

View File

@@ -288,7 +288,10 @@ static void send_ra_alias(time_t now, int iface, char *iface_name, struct in6_ad
context->netid.next = &context->netid;
}
if (!iface_enumerate(AF_INET6, &parm, add_prefixes))
/* If no link-local address then we can't advertise since source address of
advertisement must be link local address: RFC 4861 para 6.1.2. */
if (!iface_enumerate(AF_INET6, &parm, add_prefixes) ||
parm.link_pref_time == 0)
return;
/* Find smallest preferred time within address classes,