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

Add bridge dump support #412

Merged
merged 1 commit into from Aug 23, 2019
Merged

Conversation

diconico07
Copy link
Contributor

This PR add support for bridge neigh entries dump on subscribe and also add a bridge related attribute to neigh structure

@diconico07
Copy link
Contributor Author

Added support of MasterIndex in neighHandle() as I forgot it at first.

@vishvananda
Copy link
Owner

The code here looks correct. Is it possible to create a test to validate that it is working properly?

@diconico07 diconico07 force-pushed the add_bridge_dump branch 5 times, most recently from 75094cd to d20ad42 Compare May 10, 2019 13:12
@diconico07
Copy link
Contributor Author

I had to change a bit more than I thought for the tests. The only disappointing thing is the need for a vxlan interface in the test as the FDB entries for vxlan interfaces are really close to usual neigh entries and can thus be checked using the same function in the tests.

Copy link
Contributor

@jellonek jellonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@diconico07
Copy link
Contributor Author

Anything else needed from me ?

@aboch
Copy link
Collaborator

aboch commented Aug 20, 2019

Please squash your commits into one

When subscribing to neigh updates, the updates for all neigh
protocol families are received. However when listExisting is set,
the request is made with AF_UNSPEC family, this request does not
include AF_BRIDGE entries.

This patch add a second request for AF_BRIDGE entries.

Add test for existing AF_BRIDGE entry and make expectNeighUpdate
take a slice of expected updates

Creates a VXLAN interface for this test as its AF_BRIDGE entries
looks a lot like usual ones

Also add support for latest (2014+) neighbour attributes

NDA_MASTER was added back in 2014, it indicates whether a neigh
entry is linked to a master interface and index of this interface.

The other entries, namely NDA_LINK_NETNSID and NDA_SRC_VNI were
added later and will need extra handling.

Signed-off-by: Nicolas Belouin <nicolas.belouin@gandi.net>
@aboch
Copy link
Collaborator

aboch commented Aug 23, 2019

LGTM

@aboch aboch merged commit a1c9a64 into vishvananda:master Aug 23, 2019
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

Successfully merging this pull request may close these issues.

None yet

4 participants