Commit a94856c4 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't call gettime in parse_packets if timestamps are not enabled.

parent 4ffe9734
...@@ -284,8 +284,10 @@ parse_packet(const unsigned char *from, struct interface *ifp, ...@@ -284,8 +284,10 @@ parse_packet(const unsigned char *from, struct interface *ifp,
/* Content of the RTT sub-TLV on IHU messages. */ /* Content of the RTT sub-TLV on IHU messages. */
unsigned int hello_send_us = 0, hello_rtt_receive_time = 0; unsigned int hello_send_us = 0, hello_rtt_receive_time = 0;
/* We want to track exactly when we received this packet. */ if(ifp->enable_timestamps) {
gettime(&now); /* We want to track exactly when we received this packet. */
gettime(&now);
}
if(!linklocal(from)) { if(!linklocal(from)) {
fprintf(stderr, "Received packet from non-local address %s.\n", fprintf(stderr, "Received packet from non-local address %s.\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment