Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lldpd can return negative age #572

Open
vivekrnv opened this issue Feb 8, 2023 · 0 comments · May be fixed by #583
Open

lldpd can return negative age #572

vivekrnv opened this issue Feb 8, 2023 · 0 comments · May be fixed by #583
Labels

Comments

@vivekrnv
Copy link

vivekrnv commented Feb 8, 2023

admin@sonic:~$ lldpctl -v
1.0.4

Bug description

lldpd returned negative age because of the late time sync by ntpd

hwclock of the system was set to future, lldpd process started before the ntpd could re-adjust the time back.

Negative age is seen because the hwclock of the system being forward in time and the system time is later reset to correct time by ntpd. But the lldp agent for one of the interfaces started before ntpd sync and thus the init time is forward in time causing the age to be negative.

{
    "lldp": {
        "interface": {
            "eth0": {
                "via": "LLDP",
                "rid": "1",
                "age": "-2 day, -23:-59:-47",
            }
       }
}
@vivekrnv vivekrnv added the bug label Feb 8, 2023
vincentbernat added a commit that referenced this issue May 18, 2023
Fix #572.

However, this break two things:

 - existing client comparing the age to the non-monotonic clock
 - SNMP agent which should report time since start time which is not
   monotonic either
@vincentbernat vincentbernat linked a pull request May 18, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant