Merge branch 'master' into 1.1
[tinc] / src / net_packet.c
index fc09957..b444bc9 100644 (file)
@@ -2,6 +2,7 @@
     net_packet.c -- Handles in- and outgoing VPN packets
     Copyright (C) 1998-2005 Ivo Timmermans,
                   2000-2010 Guus Sliepen <guus@tinc-vpn.org>
+                  2010      Timothy Redaelli <timothy@redaelli.eu>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -356,7 +357,9 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
        vpn_packet_t *outpkt;
        int origlen;
        size_t outlen;
+#if defined(SOL_IP) && defined(IP_TOS)
        static int priority = 0;
+#endif
        int origpriority;
        int sock;
 
@@ -368,6 +371,8 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
        /* Make sure we have a valid key */
 
        if(!n->status.validkey) {
+               time_t now = time(NULL);
+
                ifdebug(TRAFFIC) logger(LOG_INFO,
                                   "No valid key known yet for %s (%s), forwarding via TCP",
                                   n->name, n->hostname);