X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=9c1dd3b89f2541c513990c3370087852fe7dcc96;hp=59ec5f94ef30b701d2bbbc13d4d14e6543ed5bc4;hb=04ec0b82ab9c6a2662300a9257a5aff1c4dd56e7;hpb=7bd7f5b4363f222340e5c058c243d31c576fba88 diff --git a/src/net.c b/src/net.c index 59ec5f94..9c1dd3b8 100644 --- a/src/net.c +++ b/src/net.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.c,v 1.35.4.112 2001/06/05 19:39:54 guus Exp $ + $Id: net.c,v 1.35.4.115 2001/06/21 16:16:31 guus Exp $ */ #include "config.h" @@ -69,9 +69,12 @@ # include #endif +#warning oi1 #ifdef HAVE_TUNTAP +#warning oi2 #include LINUX_IF_TUN_H #endif +#warning oi3 #include #include @@ -99,7 +102,7 @@ int total_socket_in = 0; int total_socket_out = 0; config_t *upstreamcfg; -static int seconds_till_retry; +int seconds_till_retry = 5; int keylifetime = 0; int keyexpires = 0; @@ -180,6 +183,8 @@ cp outlen += outpad; outpkt.len = outlen - sizeof(outpkt.salt); + total_socket_in += outlen; + receive_packet(cl, &outpkt); cp } @@ -342,12 +347,12 @@ cp /* Set default MAC address for ethertap devices */ mymac.type = SUBNET_MAC; - mymac.net.mac.address.x[0] = 0xfe; - mymac.net.mac.address.x[1] = 0xfd; - mymac.net.mac.address.x[2] = 0x00; - mymac.net.mac.address.x[3] = 0x00; - mymac.net.mac.address.x[4] = 0x00; - mymac.net.mac.address.x[5] = 0x00; + mymac.net.mac.address.x[0] = 0xff; + mymac.net.mac.address.x[1] = 0xff; + mymac.net.mac.address.x[2] = 0xff; + mymac.net.mac.address.x[3] = 0xff; + mymac.net.mac.address.x[4] = 0xff; + mymac.net.mac.address.x[5] = 0xff; #ifdef HAVE_LINUX #ifdef HAVE_TUNTAP @@ -1198,9 +1203,8 @@ cp { cl->status.outgoing = 0; signal(SIGALRM, sigalrm_handler); - seconds_till_retry = 5; alarm(seconds_till_retry); - syslog(LOG_NOTICE, _("Trying to re-establish outgoing connection in 5 seconds")); + syslog(LOG_NOTICE, _("Trying to re-establish outgoing connection in %d seconds"), seconds_till_retry); } /* Deactivate */