Skip to content

Commit

Permalink
bug fix to exclude SPA packets with timestamps in the future that are…
Browse files Browse the repository at this point in the history
… too great (old packets were properly excluded already)
  • Loading branch information
mrash committed Nov 23, 2011
1 parent 644b9e9 commit 72a4353
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/incoming_spa.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -379,11 +379,11 @@ incoming_spa(fko_srv_options_t *opts)
{ {
time(&now_ts); time(&now_ts);


ts_diff = now_ts - spadat.timestamp; ts_diff = abs(now_ts - spadat.timestamp);


if(ts_diff > atoi(opts->config[CONF_MAX_SPA_PACKET_AGE])) if(ts_diff > atoi(opts->config[CONF_MAX_SPA_PACKET_AGE]))
{ {
log_msg(LOG_WARNING, "SPA data is too old (%i seconds).", log_msg(LOG_WARNING, "SPA data time difference is too great (%i seconds).",
ts_diff); ts_diff);
res = SPA_MSG_TOO_OLD; res = SPA_MSG_TOO_OLD;
goto clean_and_bail; goto clean_and_bail;
Expand Down

0 comments on commit 72a4353

Please sign in to comment.