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

When removing a port and immediately add it back we will receive this warning: unable to send packet on real device for Ethernet4: No such device or address #490

Closed
tomer-israel opened this issue Dec 9, 2021 · 0 comments · Fixed by #492
Labels

Comments

@tomer-israel
Copy link

Bug description

when we remove a port and add it back immediately - lldpd is keep failing and cannot recover.
warning message keeps appearing:

[WARN/lldp] unable to send packet on real device for Ethernet4: No such device or address

the socket keeps failing when trying to send lldp packets.
this problem is related to the timer that aggregate events from netlink and only 1 second after the last event the ports will be updated:
event.c lines 738-756

if we will remove the port and immediately add the port back the deletion of the port will not be executed.
when we remove a port and add it back we have a new ifindex and the socket that we used for this port is no longer relevant since we have a new ifindex for this port.
in these cases we need to recreate the socket with the new ifindex.

Steps to reproduce the problem

remove a port and immediately add the port back, for example:

Expected outcome

no warning on log and lldp packets will be sent properly

Current outcome

Additional information

tomer-israel added a commit to tomer-israel/lldpd that referenced this issue Dec 9, 2021
…ediately (without timer)

Signed-off-by: tomeri <tomeri@nvidia.com>
vincentbernat added a commit that referenced this issue Dec 12, 2021
When an interface is deleted and recreated, we didn't detect any
change and just updated its index. However, the handles we had on this
interface are now invalid. Ensure the interface is correctly
reinitialized in this case.

Fix #490.
vincentbernat added a commit that referenced this issue Dec 12, 2021
When an interface is deleted and recreated, we didn't detect any
change and just updated its index. However, the handles we had on this
interface are now invalid. Ensure the interface is correctly
reinitialized in this case.

Fix #490.
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