https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281391
Bug ID: 281391
Summary: IPv6 multicast sent to wrong MAC address
Product: Base System
Version: 14.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
An application that joins an IPv6 multicast group without performing an
IPV6_MULTICAST_IF setsockopt() will see packets sent to the wrong MAC address.
According to RFC2464 section 7 [1], the MAC should be
33:33:DST[13]:DST[14]:DST[15]:DST[16], but FreeBSD is sending to
33:33:last:four:of:gateway. Setting IPV6_MULTICAST_IF results in the expected
destination MAC.
My uneducated analysis - It looks to me like this is because setting
IPV6_MULTICAST_IF bypasses (sys/netinet6/ip6_output.c:753) the routing code
that would otherwise modify the destination IP to be the gateway. I expect
what's missing is the equivalent of sys/netinet/ip_output.c:551 where the
destination is restored to be the multicast address after the routing decision
is made:
/*
* IP destination address is multicast. Make sure "gw"
* still points to the address in "ro". (It may have been
* changed to point to a gateway address, above.)
*/
gw = (const struct sockaddr *)dst;
[1] https://datatracker.ietf.org/doc/html/rfc2464#section-7
--
You are receiving this mail because:
You are the assignee for the bug.