X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_packet.c;h=c8f48d32b1f9fd4682166c8a4574f3f8be7bdae8;hb=43cf631bc10097448db041639ad07f84f647017e;hp=7bd619fe2e4f1abe8aba67f8b8821699a7019015;hpb=04543a57e73e29c3e2a1968fd330f03c94dd6059;p=tinc diff --git a/src/net_packet.c b/src/net_packet.c index 7bd619fe..c8f48d32 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -139,7 +139,8 @@ static void send_udp_probe_reply(node_t *n, vpn_packet_t *packet, length_t len) static void udp_probe_h(node_t *n, vpn_packet_t *packet, length_t len) { if(!DATA(packet)[0]) { logger(DEBUG_TRAFFIC, LOG_INFO, "Got UDP probe request %d from %s (%s)", packet->len, n->name, n->hostname); - return send_udp_probe_reply(n, packet, len); + send_udp_probe_reply(n, packet, len); + return; } if(DATA(packet)[0] == 2) { @@ -687,7 +688,8 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { } if(n->status.sptps) { - return send_sptps_packet(n, origpkt); + send_sptps_packet(n, origpkt); + return; } #ifdef DISABLE_LEGACY @@ -876,7 +878,7 @@ bool send_sptps_data(node_t *to, node_t *from, int type, const void *data, size_ if(relay_supported) { if(direct) { /* Inform the recipient that this packet was sent directly. */ - node_id_t nullid = {}; + node_id_t nullid = {{0}}; memcpy(buf_ptr, &nullid, sizeof(nullid)); buf_ptr += sizeof(nullid); } else { @@ -1354,7 +1356,8 @@ static void try_tx_sptps(node_t *n, bool mtu) { return; } - return try_tx(via, mtu); + try_tx(via, mtu); + return; } /* Otherwise, try to establish UDP connectivity. */ @@ -1576,7 +1579,7 @@ static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) { static void handle_incoming_vpn_packet(listen_socket_t *ls, vpn_packet_t *pkt, sockaddr_t *addr) { char *hostname; - node_id_t nullid = {}; + node_id_t nullid = {{0}}; node_t *from, *to; bool direct = false;