X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=drl%2Fstandard.c;h=9c996e3ceb9b765093bde378886344c65f510c35;hp=f0352153a3750976149fb44fe4423bc9b4b42ac7;hb=f83340496f632165030cc92cd98408a87082f6b1;hpb=9891ed21bcd3ff9f72a92e867ac7e8e0b9abb533 diff --git a/drl/standard.c b/drl/standard.c index f035215..9c996e3 100644 --- a/drl/standard.c +++ b/drl/standard.c @@ -86,7 +86,7 @@ standard_flow *standard_table_lookup(standard_flow_table table, const key_flow * flow->source_port = key->source_port; flow->dest_port = key->dest_port; flow->last_packet = key->packet_time; - gettimeofday(&flow->last_update, NULL); + flow->last_update = table->common->last_update; /* Add the flow to the hash list. */ flow->nexth = table->flows[hash]; @@ -221,7 +221,7 @@ int standard_table_cleanup(standard_flow_table table) { time_t now = time(NULL); while (current != NULL) { - if (current->last_packet + FLOW_IDLE_TIME <= now) { + if (current->last_packet + STD_FLOW_IDLE_TIME <= now) { /* Flow hasn't received a packet in the time limit - kill it. */ remove = current; current = current->next;