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

Resync addr cache on a single interface? #268

Open
cdleonard opened this issue Dec 17, 2020 · 1 comment
Open

Resync addr cache on a single interface? #268

cdleonard opened this issue Dec 17, 2020 · 1 comment

Comments

@cdleonard
Copy link
Contributor

I'm looking for a while to resync addresses inside a nl_cache (like nl_cache_resync) but for a single interface.

The kernel appears to support filtering RTM_GETADDR by ifindex but I can't figure out how to do this through nl_cache. Tips welcome.

I want to do this in order to examine IFA_F_TENTATIVE addresses generated by the kernel; no notifications are sent for those.

@cdleonard
Copy link
Contributor Author

cdleonard commented Jan 4, 2021

As far as I can tell nl_cache_resync doesn't actually work on a socket with multiple types of caches (for example link, addr and neigh). If an unrelated notification (for example a neighbor) is found during nl_cache_resync(addr_cache) then it gets dropped.

The drop happens inside nl_cache_resync > __cache_pickup > update_msg_parser > nl_cache_parse.

Normal updates happen inside nl_cache_mngr_data_ready > event_input which handles all the caches registered to the manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant