-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
gv: bind incoming socket to device #779
base: main
Are you sure you want to change the base?
Conversation
590b686
to
e58b13e
Compare
I realize this is a WIP, but i still receive the following:
where the last redacted address is our LAN port. |
Hi Brian, Could you check you actually receive a discovery acknowledge packet using wireshark ? Did you try the |
I am so sorry. i missed the new flag.
Thanks! |
Just FYI: i hacked together a dirty version of what would be needed for arvdevice as well, and verified that i could do the following:
This new feature will be VERY useful for us when commissioning new cameras or replacing old ones! |
Hi Emmanuel,
but going back to the old way of binding to the
The results:
As I stated in the above comments, the changes to interface and device WORKED for discovering the Basler cameras outside the subnet. Any thoughts? Thanks so much! |
Hi Brian, I probably will not have time to work on this pull request in the near future. But I will happily test a finalized version of this work. |
I am revisiting this again and it appears to work but for one major hiccup: SO_BINDTODEVICE is only available to root. I'm not a super strong socket programmer, so i'm not totally sure what SO_BINDTODEVICE is getting us and how this makes things work with broadcast discovery beyond the configured subnet. Also, is the only way to get it working for normal users to enable CAP_NET_RAW in capability.conf?? |
Instead of binding the socket to the interface address, use ADDR_ANY and set the BINDTODEVICE socket option. That would allow to control a device incorrectly configured.
SO_BINDTODEVICE is a linux only feature. May be this is not the right solution.
https://aravis-project.discourse.group/t/discover-camera-in-dhcp-mode/598/4