• Adam Wujek's avatar
    userspace/snmpd: bugfix 1164, replace time() with monotinic version from libwr · 3a82aacf
    Adam Wujek authored
    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: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
    3a82aacf
util.c 15 Bytes