-
Notifications
You must be signed in to change notification settings - Fork 325
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
gluon-mesh-batman-adv: get IPv6-addresses via netlink #1616
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you already test if this change has any effect on the duplicate address issue?
@NeoRaider Testing if it has an affect on the duplicate IP issue is hard as i can't even reproduce it reliably. Maybe @mweinelt is with me testing these cahnges on the experimental nodes of Freifunk Darmstadt? The cahnges itself are tested as in we have all 3 (Global, ULA, LL) IP-addresses in the respondd response. |
fd37d42
to
6fd5dbb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found one more issue, and a whitespace nitpick.
https://forum.freifunk.net/t/neue-firmware-stable-3-0-1-im-testbetrieb/20064/5 |
f1331f6
to
71eb8ba
Compare
Updated to use netlink. Now looks for the |
I think it would make sense to use libnl-tiny or libmnl for the message parsing; that way we could also deal with replies spread over multiple recv calls and wouldn't need such a huge receive buffer. libnl-tiny is already included in our firmware (although I hope to switch most users over to libmnl eventually, as it has a nicer API, is maintained more actively, and is even smaller) |
@NeoRaider So is it libnl-tiny or libmnl? I would like to overhaul it just once more. |
Alot more stuff upstream also depends on
|
cf36b77
to
dfce723
Compare
Updated the PR to use libnl-tiny. Tested on one device (AVM 4020). Works flawlessly. |
5a1c09d
to
53a1360
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looking much better now! I've found two issues I'd like to see fixed.
FILE *f = fopen("/proc/net/if_inet6", "r"); | ||
if (!f) | ||
return NULL; | ||
int br_client_ifindex = if_nametoindex("br-client"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if_nametoindex
should only be called once and passed into the callback (by making arg a struct containing the ifindex and the JSON array).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, will implement this.
|
@NeoRaider yes i hope it's fixed now. will let you know when i run tested my latest change. |
88c49c6
to
1f58c90
Compare
@NeoRaider should be fixed now- This node is running the patch: https://meshviewer.darmstadt.freifunk.net/#/en/map/5c49793001b4 |
Previously the content of "/proc/net/if_inet6" was parsed to acquire the
nodes IPv6 addresses. With this commit, IPv6 addresses are acquired
using getifaddrs() as proposed by neoraider in #1615.
Fixes #1615