mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Do multicast interface selection portably for router advertisements.
This commit is contained in:
@@ -391,10 +391,13 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
|
|||||||
addr.sin6_scope_id = iface;
|
addr.sin6_scope_id = iface;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
inet_pton(AF_INET6, ALL_NODES, &addr.sin6_addr);
|
inet_pton(AF_INET6, ALL_NODES, &addr.sin6_addr);
|
||||||
|
setsockopt(daemon->icmp6fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, &iface, sizeof(iface));
|
||||||
|
}
|
||||||
|
|
||||||
send_from(daemon->icmp6fd, 0, daemon->outpacket.iov_base, save_counter(0),
|
while (sendto(daemon->icmp6fd, daemon->outpacket.iov_base, save_counter(0), 0,
|
||||||
(union mysockaddr *)&addr, (struct all_addr *)&parm.link_local, iface);
|
(struct sockaddr *)&addr, sizeof(addr)) == -1 && retry_send());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user