Initialize sock
This commit is contained in:
parent
c17cb1a0f2
commit
94b9723917
1 changed files with 2 additions and 2 deletions
|
@ -713,7 +713,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
|
|||
/* Send the packet */
|
||||
|
||||
const sockaddr_t *sa = NULL;
|
||||
int sock;
|
||||
int sock = -1;
|
||||
|
||||
if(n->status.send_locally)
|
||||
choose_local_address(n, &sa, &sock);
|
||||
|
@ -795,7 +795,7 @@ bool send_sptps_data(node_t *to, node_t *from, int type, const void *data, size_
|
|||
memcpy(buf_ptr, data, len); buf_ptr += len;
|
||||
|
||||
const sockaddr_t *sa = NULL;
|
||||
int sock;
|
||||
int sock = -1;
|
||||
if(relay->status.send_locally)
|
||||
choose_local_address(relay, &sa, &sock);
|
||||
if(!sa)
|
||||
|
|
Loading…
Reference in a new issue