Skip to content

Commit 0e1fbe3

Browse files
committed
Auto merge of #1257 - vi:ORIGDSTADDR, r=gnzlbg
Add IP_ORIGDSTADDR and others on FreeBSD. A follow-up from #1252. CC @asomers. r? @gnzlbg
2 parents d7a1995 + 486de2b commit 0e1fbe3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

libc-test/build.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,16 @@ fn do_ctest() {
725725
s if ios && s.starts_with("RTV_") => true,
726726
s if ios && s.starts_with("DLT_") => true,
727727

728+
| "IP_ORIGDSTADDR"
729+
| "IP_RECVORIGDSTADDR"
730+
| "IPV6_ORIGDSTADDR"
731+
| "IPV6_RECVORIGDSTADDR"
732+
if freebsd =>
733+
{
734+
// FreeBSD 12 required, but CI has FreeBSD 11.
735+
true
736+
}
737+
728738
_ => false,
729739
}
730740
});

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,16 @@ pub const TCP_PCAP_OUT: ::c_int = 2048;
828828
pub const TCP_PCAP_IN: ::c_int = 4096;
829829

830830
pub const IP_BINDANY: ::c_int = 24;
831+
pub const IP_BINDMULTI: ::c_int = 25;
832+
pub const IP_RSS_LISTEN_BUCKET: ::c_int = 26;
833+
pub const IP_ORIGDSTADDR : ::c_int = 27;
834+
pub const IP_RECVORIGDSTADDR : ::c_int = IP_ORIGDSTADDR;
835+
831836
pub const IP_RECVTOS: ::c_int = 68;
832837

838+
pub const IPV6_ORIGDSTADDR: ::c_int = 72;
839+
pub const IPV6_RECVORIGDSTADDR: ::c_int = IPV6_ORIGDSTADDR;
840+
833841
pub const PF_SLOW: ::c_int = AF_SLOW;
834842
pub const PF_SCLUSTER: ::c_int = AF_SCLUSTER;
835843
pub const PF_ARP: ::c_int = AF_ARP;

0 commit comments

Comments
 (0)