X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=90bb88f160086525812438a9b93c518cf192cebf;hp=1130fa99650d595860709c7d38270348d90eb587;hb=643d8712eb2f82bde21f206306cdb6491eee7e08;hpb=5b7242285795f5143770b663055b87ebb5dd15b8 diff --git a/src/net.c b/src/net.c index 1130fa99..90bb88f1 100644 --- a/src/net.c +++ b/src/net.c @@ -185,9 +185,8 @@ cp } /* Remove a queue element */ -void del_queue(packet_queue_t **q, packet_element_t *e) +void del_queue(packet_queue_t **q, queue_element_t *e) { - queue_element_t *p, *n; cp free(e->packet); @@ -230,7 +229,7 @@ cp void flush_queue(conn_list_t *cl, packet_queue_t **pq, int (*function)(conn_list_t*,void*)) { - queue_element_t *p, *prev = NULL, *next = NULL; + queue_element_t *p, *next = NULL; cp for(p = (*pq)->head; p != NULL; ) { @@ -307,7 +306,7 @@ cp { add_queue(&(cl->sq), packet, packet->len + 2); if(!cl->status.waitingforkey) - send_key_request(to); + send_key_request(cl->vpn_ip); /* Keys should be sent to the host running the tincd */ return 0; } @@ -795,7 +794,7 @@ cp if(rp.len >= 0) { f = lookup_conn(rp.from); - if(debug_lvl > 2) + if(debug_lvl > 3) syslog(LOG_DEBUG, "packet from " IP_ADDR_S " (len %d)", IP_ADDR_V(rp.from), rp.len); if(!f) @@ -1062,10 +1061,10 @@ cp from = ntohl(*((unsigned long*)(&vp.data[26]))); to = ntohl(*((unsigned long*)(&vp.data[30]))); - if(debug_lvl > 2) + if(debug_lvl > 3) syslog(LOG_DEBUG, "An IP packet (%04x) for " IP_ADDR_S " from " IP_ADDR_S, ether_type, IP_ADDR_V(to), IP_ADDR_V(from)); - if(debug_lvl > 3) + if(debug_lvl > 4) syslog(LOG_DEBUG, MAC_ADDR_S " to " MAC_ADDR_S, MAC_ADDR_V(vp.data[0]), MAC_ADDR_V(vp.data[6]));