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

IP_RECVORIGDSTADDR not working #12

Open
ghost opened this issue Nov 18, 2020 · 5 comments
Open

IP_RECVORIGDSTADDR not working #12

ghost opened this issue Nov 18, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 18, 2020

Unknown channel option 'IP_RECVORIGDSTADDR' for channel '[id: 0x8d4431fe]'
@normanmaurer
Copy link
Member

Yep I think we not support this one atm... PRs welcome :)

@igor-lukyanov
Copy link

Tried the commit #13 in our real app.
At first sight, it seems to work (no errors occur anymore during the setOption(...) call), but it's hard to judge if it's actually fixing things (i.e. if after setting up the option local address 0.0.0.0 starts to get substituted with tproxy remote address like 10.xx.xx.xx) apparently because of the other bug #10 which causes remote addr to be always 0.0.0.0.

@igor-lukyanov
Copy link

Due to a CVE related to io_uring and AF_LOCAL sockets https://bugs.chromium.org/p/project-zero/issues/detail?id=1975 sending of ancillary data (which is used by IP_RECVORIGDSTADDR) was completely disabled in io_uring stack.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d69e07793f89
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=181e448d8709

It was partially fixed in 5.10 release candidates, but only for TCP sockets.
torvalds/linux@583bbf0

We'll post a patch to LKML and ask to enable cmsg for io_uring+UDP as well. Until it's done this task can't be implemented.

@normanmaurer
Copy link
Member

Sounds good... thanks for keep us posted

@normanmaurer
Copy link
Member

This is fixed in 5.12 ... We may want to pick this up again

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

No branches or pull requests

2 participants