X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Froute.c;h=e3bcf3bb09ffc302cc135167212c18019fa1abdd;hp=3d8d54af143397f7632695b7bdf461eff137a971;hb=50af33d01f425983dd2b1d7b61092a6325be3f41;hpb=a9bbb3357a89e27185312fbce0ee134eda4eda90 diff --git a/src/route.c b/src/route.c index 3d8d54af..e3bcf3bb 100644 --- a/src/route.c +++ b/src/route.c @@ -50,7 +50,10 @@ static const size_t ip6_size = sizeof(struct ip6_hdr); static const size_t icmp6_size = sizeof(struct icmp6_hdr); static const size_t ns_size = sizeof(struct nd_neighbor_solicit); static const size_t opt_size = sizeof(struct nd_opt_hdr); + +#ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif /* RFC 1071 */ @@ -217,7 +220,7 @@ void age_subnets(void) { for(node = myself->subnet_tree->head; node; node = next) { next = node->next; s = node->data; - if(s->expires && s->expires < now) { + if(s->expires && s->expires <= now) { ifdebug(TRAFFIC) { char netstr[MAXNETSTR]; if(net2str(netstr, sizeof netstr, s))