Skip to content

Ipv4RecvDstAddr recvmsg stuff disabled on Linux #1767

Closed
@brianmay

Description

@brianmay

It looks like definitions needed to find the real IP destination of a TPROXY redirected stream are disabled on Linux. Such as:

nix::sys::socket::sockopt::Ipv4RecvDstAddr
ControlMessageOwned::Ipv4RecvDstAddr

And the equivalent IPv6 versions.

https://powerdns.org/tproxydoc/tproxy.md.html

These are valid on Linux and should be enabled.

e.g. the code has:

#[cfg(any(
    target_os = "freebsd",
    target_os = "ios",
    target_os = "macos",
    target_os = "netbsd",
    target_os = "openbsd",
))]
#[cfg(feature = "net")]
sockopt_impl!(
    #[cfg_attr(docsrs, doc(cfg(feature = "net")))]
    /// The `recvmsg(2)` call will return the destination IP address for a UDP
    /// datagram.
    Ipv4RecvDstAddr, Both, libc::IPPROTO_IP, libc::IP_RECVDSTADDR, bool);

I believe this explains why I cannot use the on Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions