mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
Remove unused whitespace, add missing header change, make it compile
This commit is contained in:
parent
bdfa65c6ab
commit
31cedb47cb
7 changed files with 20 additions and 20 deletions
|
|
@ -1215,12 +1215,12 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
|||
}
|
||||
}
|
||||
if(do_tcp) {
|
||||
ub_sock = malloc(sizeof(struct unbound_socket));
|
||||
if(!ub_sock)
|
||||
return 0;
|
||||
int is_ssl = if_is_ssl(ifname, port, ssl_port,
|
||||
tls_additional_port);
|
||||
enum listen_type port_type;
|
||||
ub_sock = malloc(sizeof(struct unbound_socket));
|
||||
if(!ub_sock)
|
||||
return 0;
|
||||
if(is_ssl)
|
||||
port_type = listen_type_ssl;
|
||||
else if(is_https)
|
||||
|
|
|
|||
|
|
@ -1632,7 +1632,7 @@ mk_local_addr(void* addr, u_short port, u_char family)
|
|||
struct in6_addr* v6addr = (struct in6_addr*)addr;
|
||||
struct sockaddr_in6 sin6;
|
||||
memset(&sin6, 0, sizeof(sin6));
|
||||
sin6.sin6_len = sizeof(sin6);
|
||||
/* sin6.sin6_len = sizeof(sin6); */
|
||||
sin6.sin6_family = AF_INET6;
|
||||
sin6.sin6_addr = *v6addr;
|
||||
sin6.sin6_port = port;
|
||||
|
|
|
|||
|
|
@ -411,13 +411,13 @@ static void p_ancil(const char* str, struct comm_reply* r)
|
|||
|
||||
if(r->srctype == 6) {
|
||||
#ifdef IPV6_PKTINFO
|
||||
char buf[1024];
|
||||
if(inet_ntop(AF_INET6, &r->pktinfo.v6info.ipi6_addr,
|
||||
buf, (socklen_t)sizeof(buf)) == 0) {
|
||||
(void)strlcpy(buf, "(inet_ntop error)", sizeof(buf));
|
||||
}
|
||||
buf[sizeof(buf)-1]=0;
|
||||
log_info("%s: %s %d", str, buf, r->pktinfo.v6info.ipi6_ifindex);
|
||||
char buf[1024];
|
||||
if(inet_ntop(AF_INET6, &r->pktinfo.v6info.ipi6_addr,
|
||||
buf, (socklen_t)sizeof(buf)) == 0) {
|
||||
(void)strlcpy(buf, "(inet_ntop error)", sizeof(buf));
|
||||
}
|
||||
buf[sizeof(buf)-1]=0;
|
||||
log_info("%s: %s %d", str, buf, r->pktinfo.v6info.ipi6_ifindex);
|
||||
#endif
|
||||
} else if(r->srctype == 4) {
|
||||
#ifdef IP_PKTINFO
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ struct comm_point* comm_point_create_tcp(struct comm_base* base,
|
|||
struct tcl_list* tcp_conn_limit,
|
||||
size_t bufsize, struct sldns_buffer* spoolbuf,
|
||||
enum listen_type port_type,
|
||||
comm_point_callback_type* callback, void* callback_arg);
|
||||
comm_point_callback_type* callback, void* callback_arg, struct unbound_socket* socket);
|
||||
|
||||
/**
|
||||
* Create an outgoing TCP commpoint. No file descriptor is opened, left at -1.
|
||||
|
|
|
|||
Loading…
Reference in a new issue