Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/2688.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
changed Ipv6MembershipRequest::new to take an additional interface (ifindex) argument
6 changes: 3 additions & 3 deletions src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::sys::time::TimeSpec;
use crate::sys::time::TimeVal;
use crate::{errno::Errno, Result};
use cfg_if::cfg_if;
use libc::{self, c_int, size_t, socklen_t};
use libc::{self, c_int, c_uint, size_t, socklen_t};
#[cfg(all(feature = "uio", not(target_os = "redox")))]
use libc::{
c_void, iovec, CMSG_DATA, CMSG_FIRSTHDR, CMSG_LEN, CMSG_NXTHDR, CMSG_SPACE,
Expand Down Expand Up @@ -633,10 +633,10 @@ pub struct Ipv6MembershipRequest(libc::ipv6_mreq);

impl Ipv6MembershipRequest {
/// Instantiate a new `Ipv6MembershipRequest`
pub const fn new(group: net::Ipv6Addr) -> Self {
pub const fn new(group: net::Ipv6Addr, interface: c_uint) -> Self {
Ipv6MembershipRequest(libc::ipv6_mreq {
ipv6mr_multiaddr: ipv6addr_to_libc(&group),
ipv6mr_interface: 0,
ipv6mr_interface: interface,
})
}
}
Expand Down
Loading