Skip to content

Commit

Permalink
fix iOS setsockopt invalid params
Browse files Browse the repository at this point in the history
  • Loading branch information
SSebo authored and djc committed Sep 12, 2020
1 parent 751d660 commit c0eaab7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quinn/src/platform/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ impl super::UdpExt for UdpSocket {

let addr = self.local_addr()?;

// macos doesn't support IP_RECVTOS on dual-stack sockets :(
if addr.is_ipv4() || (!cfg!(target_os = "macos") && !self.only_v6()?) {
// macos and ios do not support IP_RECVTOS on dual-stack sockets :(
if addr.is_ipv4()
|| ((!cfg!(any(target_os = "macos", target_os = "ios"))) && !self.only_v6()?)
{
let on: libc::c_int = 1;
let rc = unsafe {
libc::setsockopt(
Expand Down

0 comments on commit c0eaab7

Please sign in to comment.