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

Add IP6T_SO_ORIGINAL_DST for Linux #1650

Closed
zonyitoo opened this issue Jan 30, 2020 · 1 comment · Fixed by #1651
Closed

Add IP6T_SO_ORIGINAL_DST for Linux #1650

zonyitoo opened this issue Jan 30, 2020 · 1 comment · Fixed by #1651

Comments

@zonyitoo
Copy link
Contributor

zonyitoo commented Jan 30, 2020

Target

  • i686-unknown-linux-gnu
  • x86_64-unknown-linux-gnu

References

// For IPv4, we can use SO_ORIGINAL_DST on SOL_IP level
ret = getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, destaddr, &socklen);

// For IPv6, we should use IP6T_SO_ORIGINAL_DST on SOL_IPV6 level
ret = getsockopt(fd, SOL_IPV6, IP6T_SO_ORIGINAL_DST, destaddr, &socklen);

Defined in #include <linux/netfilter_ipv6/ip6_tables.h>

#define IP6T_SO_ORIGINAL_DST            80
@zonyitoo
Copy link
Contributor Author

zonyitoo commented Jan 30, 2020

But actually, IP6T_SO_ORIGINAL_DST has exactly the same value as SO_ORIGINAL_DST.

https://patchwork.ozlabs.org/patch/195443/

We can use SO_ORIGINAL_DST for now, temporary.

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 a pull request may close this issue.

1 participant