- Tentative fix for permission denied on IPv6 address on FreeBSD.

git-svn-id: file:///svn/unbound/trunk@4754 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2018-06-26 08:01:44 +00:00
parent 025fdd0049
commit 23f475bccc
2 changed files with 5 additions and 0 deletions

View file

@ -1,3 +1,6 @@
26 June 2018: Wouter
- Tentative fix for permission denied on IPv6 address on FreeBSD.
21 June 2018: Wouter 21 June 2018: Wouter
- #4108: systemd reload hang fix. - #4108: systemd reload hang fix.
- Fix usage printout for unbound-host, hostname has to be last - Fix usage printout for unbound-host, hostname has to be last

View file

@ -1036,6 +1036,8 @@ udp_sockport(struct sockaddr_storage* addr, socklen_t addrlen, int pfxlen,
int freebind = 0; int freebind = 0;
struct sockaddr_in6 sa = *(struct sockaddr_in6*)addr; struct sockaddr_in6 sa = *(struct sockaddr_in6*)addr;
sa.sin6_port = (in_port_t)htons((uint16_t)port); sa.sin6_port = (in_port_t)htons((uint16_t)port);
sa.sin6_flowinfo = 0;
sa.sin6_scope_id = 0;
if(pfxlen != 0) { if(pfxlen != 0) {
freebind = 1; freebind = 1;
sai6_putrandom(&sa, pfxlen, rnd); sai6_putrandom(&sa, pfxlen, rnd);