Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

rtnetlink/neigh: add append helper to AF_BRIDGE #237

Closed
wants to merge 1 commit into from

Conversation

uprhst
Copy link

@uprhst uprhst commented Feb 18, 2022

This addition allows us to append to the end of object object list, since we cannot edit the NetlinkMessage header object and otherwise one would need to reimplement the execute function to change this flag.

@little-dude
Copy link
Owner

Thanks for the PR @uprhst !

The changes look good but it looks like you need to run rustfmt. Perhaps this method be added to other requests as well? Also, out of curiosity, what is your use case for this?

@uprhst
Copy link
Author

uprhst commented Feb 22, 2022

The changes look good but it looks like you need to run rustfmt. Perhaps this method be added to other requests as well? Also, out of curiosity, what is your use case for this?

Hi, thanks. Yeah, I missed that, unfortunately I will not be around to fix that for another week or two.

In my case I have to add multiple neigh endpoints with different destination address and the same lladdr value, so the combination of NLM_F_EXCL | NLM_F_CREATE results in error the record already exists, appending to the end of the object list is actually what I needed, hence the modifications to the script.

I think maybe it would be easier exporting an API to the underlying NetlinkMessage, allowing us to edit header before the message is sent?

@uprhst
Copy link
Author

uprhst commented Feb 28, 2022

@little-dude sorry for the delay, this should be fine now, please check whenever you can.

@little-dude
Copy link
Owner

little-dude commented Mar 6, 2022

Hey @uprhst

Thanks for you for the PR. I was manually merging your changes because of the build issue, but then thought I might as well add a way to set the flags in every request as you suggested. I ended up with #246. So I'm going to close this PR (your commit is included in #246 though).

@little-dude little-dude closed this Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants