From owner-freebsd-bugs@FreeBSD.ORG Fri Jun 28 18:50:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CB3DFB60 for ; Fri, 28 Jun 2013 18:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 982031EFC for ; Fri, 28 Jun 2013 18:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r5SIo1fX098985 for ; Fri, 28 Jun 2013 18:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r5SIo16E098947; Fri, 28 Jun 2013 18:50:01 GMT (envelope-from gnats) Resent-Date: Fri, 28 Jun 2013 18:50:01 GMT Resent-Message-Id: <201306281850.r5SIo16E098947@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bernd Walter Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 449E8A53 for ; Fri, 28 Jun 2013 18:44:52 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id 363661EB8 for ; Fri, 28 Jun 2013 18:44:52 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r5SIioaT099106 for ; Fri, 28 Jun 2013 18:44:50 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r5SIioVP099105; Fri, 28 Jun 2013 18:44:50 GMT (envelope-from nobody) Message-Id: <201306281844.r5SIioVP099105@oldred.freebsd.org> Date: Fri, 28 Jun 2013 18:44:50 GMT From: Bernd Walter To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/180065: Multicast loopback to own host broken X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jun 2013 18:50:01 -0000 >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: