Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jun 2013 18:44:50 GMT
From:      Bernd Walter <ticso@cicely.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/180065: Multicast loopback to own host broken
Message-ID:  <201306281844.r5SIioVP099105@oldred.freebsd.org>
Resent-Message-ID: <201306281850.r5SIo16E098947@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306281844.r5SIioVP099105>