make_sock(int stype, const char* ifname, const char* port,
struct addrinfo *hints, int v6only, int* noip6, size_t rcv, size_t snd,
int* reuseport, int transparent, int tcp_mss, int nodelay, int freebind,
- int use_systemd, int dscp, struct unbound_socket** ub_sock)
+ int use_systemd, int dscp, struct unbound_socket* ub_sock)
{
struct addrinfo *res = NULL;
int r, s, inuse, noproto;
}
}
- (*ub_sock)->addr = res;
- (*ub_sock)->s = s;
- (*ub_sock)->fam = hints->ai_family;
+ ub_sock->addr = res;
+ ub_sock->s = s;
+ ub_sock->fam = hints->ai_family;
return s;
}
make_sock_port(int stype, const char* ifname, const char* port,
struct addrinfo *hints, int v6only, int* noip6, size_t rcv, size_t snd,
int* reuseport, int transparent, int tcp_mss, int nodelay, int freebind,
- int use_systemd, int dscp, struct unbound_socket** ub_sock)
+ int use_systemd, int dscp, struct unbound_socket* ub_sock)
{
char* s = strchr(ifname, '@');
if(s) {
return 0;
if((s = make_sock_port(SOCK_DGRAM, ifname, port, hints, 1,
&noip6, rcv, snd, reuseport, transparent,
- tcp_mss, nodelay, freebind, use_systemd, dscp, &ub_sock)) == -1) {
+ tcp_mss, nodelay, freebind, use_systemd, dscp, ub_sock)) == -1) {
free(ub_sock);
if(noip6) {
log_warn("IPv6 protocol not available");
/* regular udp socket */
if((s = make_sock_port(SOCK_DGRAM, ifname, port, hints, 1,
&noip6, rcv, snd, reuseport, transparent,
- tcp_mss, nodelay, freebind, use_systemd, dscp, &ub_sock)) == -1) {
+ tcp_mss, nodelay, freebind, use_systemd, dscp, ub_sock)) == -1) {
free(ub_sock);
if(noip6) {
log_warn("IPv6 protocol not available");
port_type = listen_type_tcp;
if((s = make_sock_port(SOCK_STREAM, ifname, port, hints, 1,
&noip6, 0, 0, reuseport, transparent, tcp_mss, nodelay,
- freebind, use_systemd, dscp, &ub_sock)) == -1) {
+ freebind, use_systemd, dscp, ub_sock)) == -1) {
free(ub_sock);
if(noip6) {
/*log_warn("IPv6 protocol not available");*/