-
Notifications
You must be signed in to change notification settings - Fork 696
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
Use IP_RECVDSTADDR in absence of IP_PKTINFO #772
base: master
Are you sure you want to change the base?
Use IP_RECVDSTADDR in absence of IP_PKTINFO #772
Conversation
On FreeBSD-like network stacks, the socket option IP_PKTINFO is unavailable, but the option IP_RECVDSTADDR can be used instead. This enables vsomeip for the new io-sock network stack on QNX 7.1+. Co-author: Eric Sjöström <[email protected]> @EriComic
00aded5
to
ee80f4e
Compare
@danielfr-haleytek can you rebase this? the value that you mentioned (IP_PKTINFO) that was hardcoded was just added to be able to build on QNX. if it makes sense for you to remove it, please make that change also on this PR |
Change-Id: I53da16f0df5eac1577a789fa418b81bdb4dc2301
@duartenfonseca: I just uploaded a new version with 3.5.1 merged. |
@danielfr-haleytek can we just merge this one for now, for us to do some more internal testing? while keeping the SO_BINDTODEVICE part as is right now. I also added a question on the other PR |
@duartenfonseca From our side, you can absolutely merge this PR, but we would recommend doing some basic testing (running your test suite) first as good practice. Please also note in particular:
|
@danielfr-haleytek yes we will first test both PR's internally, and then decide merging or not. I think it would make more sense like this. thanks for all your input (and EriComic). |
for (struct cmsghdr *cmsg = CMSG_FIRSTHDR(&its_header); | ||
cmsg != NULL; | ||
cmsg = CMSG_NXTHDR(&its_header, cmsg)) { | ||
|
||
#if defined(IP_PKTINFO) |
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.
nitpicking, but can you add a small comment to the if/elif/else with the OS types that should go in that part of the code.
It will make life easier to new devs working on this part of the code.
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.
Done
On FreeBSD-like network stacks, the socket option IP_PKTINFO is unavailable, but the option IP_RECVDSTADDR can be used instead.
This enables vsomeip for the new io-sock network stack on QNX 7.1+.
Co-author: Eric Sjöström [email protected] @EriComic