mirror of
https://github.com/monero-project/monero.git
synced 2025-07-24 22:05:23 -04:00
update unbound from upstream
This commit is contained in:
parent
b0151de601
commit
1f49833d4f
155 changed files with 5482 additions and 3440 deletions
17
external/unbound/pythonmod/pythonmod_utils.c
vendored
17
external/unbound/pythonmod/pythonmod_utils.c
vendored
|
@ -48,7 +48,8 @@
|
|||
#include "util/data/msgreply.h"
|
||||
#include "util/storage/slabhash.h"
|
||||
#include "util/regional.h"
|
||||
#include "ldns/sbuffer.h"
|
||||
#include "iterator/iter_delegpt.h"
|
||||
#include "sldns/sbuffer.h"
|
||||
|
||||
#undef _POSIX_C_SOURCE
|
||||
#undef _XOPEN_SOURCE
|
||||
|
@ -176,3 +177,17 @@ void reply_addr2str(struct comm_reply* reply, char* dest, int maxlen)
|
|||
return;
|
||||
dest[maxlen-1] = 0;
|
||||
}
|
||||
|
||||
/* Convert target->addr to string */
|
||||
void delegpt_addr_addr2str(struct delegpt_addr* target, char *dest, int maxlen)
|
||||
{
|
||||
int af = (int)((struct sockaddr_in*) &(target->addr))->sin_family;
|
||||
void* sinaddr = &((struct sockaddr_in*) &(target->addr))->sin_addr;
|
||||
|
||||
if(af == AF_INET6)
|
||||
sinaddr = &((struct sockaddr_in6*)&(target->addr))->sin6_addr;
|
||||
dest[0] = 0;
|
||||
if (inet_ntop(af, sinaddr, dest, (socklen_t)maxlen) == 0)
|
||||
return;
|
||||
dest[maxlen-1] = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue