mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Fix RA on *BSD (missing sa_len)
This commit is contained in:
@@ -106,8 +106,11 @@ void send_from(int fd, int nowild, char *packet, size_t len,
|
||||
msg.msg_controllen = 0;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
if (retry_send())
|
||||
goto retry;
|
||||
|
||||
my_syslog(LOG_ERR, _("failed to send packet: %s"), strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,10 +20,11 @@
|
||||
not used by DHCPv4 code. */
|
||||
|
||||
#include "dnsmasq.h"
|
||||
#include <netinet/icmp6.h>
|
||||
|
||||
#ifdef HAVE_DHCP6
|
||||
|
||||
#include <netinet/icmp6.h>
|
||||
|
||||
struct ra_param {
|
||||
int ind, managed, found_context, first;
|
||||
char *if_name;
|
||||
@@ -102,8 +103,7 @@ void ra_start_unsolicted(time_t now)
|
||||
for (context = daemon->ra_contexts; context; context = context->next)
|
||||
context->ra_time = now + (rand16()/13000);
|
||||
|
||||
/* re-do ras after a short time, in case the first gets lost.
|
||||
This is reset once that's done. */
|
||||
/* re-do frequently for a minute or so, in case the first gets lost. */
|
||||
ra_short_period_start = now;
|
||||
}
|
||||
|
||||
@@ -241,6 +241,9 @@ static void send_ra(int iface, char *iface_name, struct in6_addr *dest)
|
||||
|
||||
/* decide where we're sending */
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
#ifdef HAVE_SOCKADDR_SA_LEN
|
||||
addr.sin6_len = sizeof(struct sockaddr_in6);
|
||||
#endif
|
||||
addr.sin6_family = AF_INET6;
|
||||
addr.sin6_port = htons(IPPROTO_ICMPV6);
|
||||
if (dest)
|
||||
|
||||
Reference in New Issue
Block a user