Skip to content
Snippets Groups Projects
Commit 3a82aacf authored by Adam Wujek's avatar Adam Wujek :speech_balloon:
Browse files

userspace/snmpd: bugfix 1164, replace time() with monotinic version from libwr


It was possible that SNMP objects in expert branch don't update.
It pop-up in following scenario:
1. slave switch is started with no ntp configured
2. read via snmp from slave
3. master switch is started with no ntp configured
4. slave sync to master and set it's time, by this system clock on slave is set
   to earlier date
5. read via snmp from slave will end up in the same results in expert branch of
   the MIB.

Our part of SNMP implementation used "time" function for calculating SNMP's
cache timeouts. When clock is set backwards then cache can be valid for very
long time.

Monotonic clock is used instead from ulit.c (libwr)

Add util.c to the compilation.

Signed-off-by: default avatarAdam Wujek <adam.wujek@cern.ch>
parent 05f51137
Branches
Tags
No related merge requests found
Showing
with 20 additions and 17 deletions
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