Bug 180065

Summary: [netinet6] [patch] Multicast loopback to own host broken
Product: Base System Reporter: Bernd Walter <ticso>
Component: kernAssignee: Andrey V. Elsukov <ae>
Status: Closed FIXED    
Severity: Affects Only Me CC: ae, feld, glebius
Priority: Normal    
Version: 9.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Bernd Walter 2013-06-28 19:50:00 UTC
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.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-06-28 20:59:39 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Mark Felder freebsd_committer freebsd_triage 2015-04-27 16:33:22 UTC
ae, glebius -- you seem to be active in IPv6 / multicast somewhat recently

I was alerted via Twitter that a user has been applying this patch for a few years. Is it still relevant? If so, can you help get this into the tree? It doesn't seem to apply cleanly to head a the moment -- perhaps due to your recent multicast work


Thanks!!
Comment 3 Andrey V. Elsukov freebsd_committer freebsd_triage 2015-04-27 17:47:43 UTC
I'll take a look.
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-05-07 14:18:18 UTC
A commit references this bug:

Author: ae
Date: Thu May  7 14:17:44 UTC 2015
New revision: 282578
URL: https://svnweb.freebsd.org/changeset/base/282578

Log:
  Mark data checksum as valid for multicast packets, that we send back
  to myself via simloop.
  Also remove duplicate check under #ifdef DIAGNOSTIC.

  PR:		180065
  MFC after:	1 week

Changes:
  head/sys/netinet6/ip6_output.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-05-14 11:47:34 UTC
A commit references this bug:

Author: ae
Date: Thu May 14 11:47:18 UTC 2015
New revision: 282894
URL: https://svnweb.freebsd.org/changeset/base/282894

Log:
  MFC r282578:
    Mark data checksum as valid for multicast packets, that we send back
    to myself via simloop.
    Also remove duplicate check under #ifdef DIAGNOSTIC.

    PR:		180065

Changes:
_U  stable/10/
  stable/10/sys/netinet6/ip6_output.c
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-05-14 11:52:36 UTC
A commit references this bug:

Author: ae
Date: Thu May 14 11:52:27 UTC 2015
New revision: 282895
URL: https://svnweb.freebsd.org/changeset/base/282895

Log:
  MFC r282578:
    Mark data checksum as valid for multicast packets, that we send back
    to myself via simloop.
    Also remove duplicate check under #ifdef DIAGNOSTIC.

    PR:		180065

Changes:
_U  stable/9/sys/
  stable/9/sys/netinet6/ip6_output.c
Comment 7 Andrey V. Elsukov freebsd_committer freebsd_triage 2015-05-14 11:53:32 UTC
Fixed in head/, stable/10 and stable/9. Thanks!