Skip to content

Commit

Permalink
fix(local-redir): FreeBSD UDP set IP_RECVORIGDSTADDR, IPV6_RECVORIGDS…
Browse files Browse the repository at this point in the history
…TADDR

NOTE: They have the same value as IP_ORIGDSTADDR, IPV6_ORIGDSTADDR

ref #1543
  • Loading branch information
zonyitoo committed Jun 25, 2024
1 parent 8b32d85 commit 6d7bc35
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ fn set_ip_origdstaddr(level: libc::c_int, socket: &Socket) -> io::Result<()> {
let enable: libc::c_int = 1;

let opt = match level {
libc::IPPROTO_IP => libc::IP_ORIGDSTADDR,
libc::IPPROTO_IPV6 => libc::IPV6_ORIGDSTADDR,
libc::IPPROTO_IP => libc::IP_RECVORIGDSTADDR,
libc::IPPROTO_IPV6 => libc::IPV6_RECVORIGDSTADDR,
_ => unreachable!("level can only be IPPROTO_IP or IPPROTO_IPV6"),
};

Expand Down

0 comments on commit 6d7bc35

Please sign in to comment.