X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_packet.c;h=43b8e7cdc0fe634b26afb0bfd9b3fcabce2c199e;hb=4e80612ac0f38daa0f2280c293427c7f25dac278;hp=aa5bea3415750f07bd3ded17b7563bc92d28a353;hpb=b4c913aaa926d80a72aeb97459f84f992b65d1ed;p=tinc diff --git a/src/net_packet.c b/src/net_packet.c index aa5bea34..43b8e7cd 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net_packet.c,v 1.1.2.37 2003/08/08 19:42:35 guus Exp $ + $Id: net_packet.c,v 1.1.2.40 2003/08/28 21:05:10 guus Exp $ */ #include "system.h" @@ -367,7 +367,7 @@ void broadcast_packet(const node_t *from, vpn_packet_t *packet) packet->len, from->name, from->hostname); for(node = connection_tree->head; node; node = node->next) { - c = (connection_t *) node->data; + c = node->data; if(c->status.active && c->status.mst && c != from->nexthop->connection) send_packet(c->node, packet); @@ -384,7 +384,7 @@ void flush_queue(node_t *n) for(node = n->queue->head; node; node = next) { next = node->next; - send_udppacket(n, (vpn_packet_t *) node->data); + send_udppacket(n, node->data); list_delete_node(n->queue, node); } } @@ -392,7 +392,6 @@ void flush_queue(node_t *n) void handle_incoming_vpn_data(int sock) { vpn_packet_t pkt; - int x, l = sizeof(x); char *hostname; sockaddr_t from; socklen_t fromlen = sizeof(from); @@ -400,18 +399,6 @@ void handle_incoming_vpn_data(int sock) cp(); - if(getsockopt(sock, SOL_SOCKET, SO_ERROR, &x, &l) < 0) { - logger(LOG_ERR, _("This is a bug: %s:%d: %d:%s"), - __FILE__, __LINE__, sock, strerror(errno)); - cp_trace(); - exit(1); - } - - if(x) { - logger(LOG_ERR, _("Incoming data socket error: %s"), strerror(x)); - return; - } - pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen); if(pkt.len <= 0) {