kern/180065: Multicast loopback to own host broken

Bernd Walter ticso at cicely.de
Fri Jun 28 18:50:01 UTC 2013


>Number:         180065
>Category:       kern
>Synopsis:       Multicast loopback to own host broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 28 18:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Walter
>Release:        9.1-STABLE
>Organization:
>Environment:
>Description:
Using IPv6 multicast it is impossible to receive packets on the same host.
Problem is that the packet checksums are not calculated yet when the packet is handed over to if_simloop() and get dropped later in udp6_input().
The fix handles the problem with IPv6, but it wasn't verified if IPv4 code has a similar bug.

>How-To-Repeat:
send packet via mcastsend from mcast-tools port and try to receive the packet with mcread on the same host.
Another host can receive the packet, but no process on the same host.

>Fix:
Index: netinet6/ip6_output.c
===================================================================
--- netinet6/ip6_output.c       (revision 251406)
+++ netinet6/ip6_output.c       (working copy)
@@ -749,6 +749,13 @@
               }
               if ((im6o == NULL && in6_mcast_loop) ||
                   (im6o && im6o->im6o_multicast_loop)) {
+
+               if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) {
+                       plen = m->m_pkthdr.len - sizeof(*ip6);
+                       in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr));
+                       m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6;
+               }
+
                /*
                 * Loop back multicast datagram if not expressly
                 * forbidden to do so, even if we have not joined


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list