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

net/linux: add net_netlink_addrs #1232

Merged
merged 10 commits into from
Dec 16, 2024
Merged

net/linux: add net_netlink_addrs #1232

merged 10 commits into from
Dec 16, 2024

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Dec 12, 2024

This pull request adds support for obtaining network interface addresses using the RTNETLINK API on Linux systems.

fixes baresip/baresip#3245

@alfredh
Copy link
Contributor

alfredh commented Dec 14, 2024

seems to work on Linux:

Local network addresses:
     enp2s0:  10.0.1.2
     enp2s0:  fe80::ea9c:25ff:fe8a:f1fe

@sreimers sreimers marked this pull request as ready for review December 15, 2024 15:24
@sreimers
Copy link
Member Author

@cspiel1 @maximilianfridrich @juha-h would be nice if you can test this PR too.

@juha-h
Copy link
Contributor

juha-h commented Dec 16, 2024

I built baresip app using re of this PR and baresip app on Debian worked OK over WiFi interface.

src/net/net.c Outdated Show resolved Hide resolved
@maximilianfridrich
Copy link
Contributor

I just tested it with my normal setup and with a setup mimicking @robert-scheck's. Looks good.

PS: I setup a new bridge interface br9 and assigned a tentative IPv6 using sudo ip addr add fd00::1/64 dev br9 tentative. With main branch, it crashed, with this branch, the tentative IPv6 is ignored.

Copy link
Contributor

@robert-scheck robert-scheck left a comment

Choose a reason for hiding this comment

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

I can't comment about the actual code changes, just about the result: Yes, it solves the problem, thank you :)

@sreimers
Copy link
Member Author

Thanks all for testing and review!

@sreimers sreimers merged commit 45c810a into main Dec 16, 2024
38 checks passed
@sreimers sreimers deleted the net_netlink_addrs branch December 16, 2024 09:35
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.

Baresip tries to bind to IPv6 address it shouldn't try to bind (and fails hard)
5 participants