Skip to content

Wrong flag used for (set_)ipv6_multicast_hops #1660

Description

@NfNitLoop

v1.1.4

#[inline]
pub(crate) fn set_ipv6_multicast_hops(fd: BorrowedFd<'_>, multicast_hops: u32) -> io::Result<()> {
setsockopt(fd, c::IPPROTO_IP, c::IPV6_MULTICAST_HOPS, multicast_hops)
}

#[inline]
pub(crate) fn set_ipv6_multicast_hops(fd: BorrowedFd<'_>, multicast_hops: u32) -> io::Result<()> {
setsockopt(fd, c::IPPROTO_IP, c::IPV6_MULTICAST_HOPS, multicast_hops)
}

These two cases (and their getter counterparts) should use IPPROTO_IPV6, not IPPROTO_IP.

A library I use had to work around this bug:
https://github.com/al8n/hick/pull/49/changes#diff-5f92e53a99f51d3b30937d394280111bf28c84ff3f340c6ad82a08364d2e0cb0R24-R32

I'm just here making sure the issue got reported upstream. 🫡

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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