X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Froute.c;h=00ba4c05b19a7a33f5ed978270ed3b24f99b8a7a;hb=4c30004cb6dc23616d7295b0ce631f066e7f1f82;hp=1d0c6f8a40efc15560bdade6fec92450ddbb35b4;hpb=1be7dc759a64d436fd7586aad43b545f2dc665b5;p=tinc diff --git a/src/route.c b/src/route.c index 1d0c6f8a..00ba4c05 100644 --- a/src/route.c +++ b/src/route.c @@ -1,7 +1,7 @@ /* route.c -- routing Copyright (C) 2000-2005 Ivo Timmermans, - 2000-2012 Guus Sliepen + 2000-2013 Guus Sliepen 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 @@ -229,7 +229,7 @@ static void learn_mac(mac_t *address) { subnet = new_subnet(); subnet->type = SUBNET_MAC; - subnet->expires = time(NULL) + macexpire; + subnet->expires = now.tv_sec + macexpire; subnet->net.mac.address = *address; subnet->weight = 10; subnet_add(myself, subnet); @@ -244,7 +244,7 @@ static void learn_mac(mac_t *address) { timeout_add(&age_subnets_timeout, age_subnets, NULL, &(struct timeval){10, rand() % 100000}); } else { if(subnet->expires) - subnet->expires = time(NULL) + macexpire; + subnet->expires = now.tv_sec + macexpire; } }