NetBSD Problem Report #11629

Received: (qmail 6987 invoked from network); 4 Dec 2000 11:19:28 -0000
Message-Id: <200012041119.eB4BJNp18298@horn.ics.muni.cz>
Date: Mon, 4 Dec 2000 12:19:23 +0100 (MET)
From: salvet@ics.muni.cz
Reply-To: salvet@ics.muni.cz
To: gnats-bugs@gnats.netbsd.org, itojun@netbsd.org
Subject: two programs can't listen to the same multicast group
X-Send-Pr-Version: 3.95

>Number:         11629
>Category:       kern
>Synopsis:       two programs can't listen to the same multicast group
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    itojun
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 04 11:20:01 +0000 2000
>Closed-Date:    Mon Feb 05 13:56:12 +0000 2001
>Last-Modified:  Mon Feb 05 13:56:12 +0000 2001
>Originator:     Zdenek Salvet
>Release:        1.5_BETA
>Organization:
Institute of Computer Science of Masaryk University, Brno, Czech Republic
>Environment:

System: NetBSD horn.ics.muni.cz 1.5_BETA NetBSD 1.5_BETA (HORN_15BETA) #1: Fri Nov 10 14:38:35 MET 2000 salvet@horn.ics.muni.cz:/usr1/home/salvet/NetBSD-1.5_BETA/source/usr/src/sys/arch/i386/compile/HORN_15BETA i386


>Description:
	sys/netinet/udp_usrreq.c contains incorrect check for multicast
	address in udp4_realinput since version 1.53 (large sync with KAME)

        src4 = &src->sin_addr;
        sport = &src->sin_port;
        dst4 = &dst->sin_addr;
        dport = &dst->sin_port;

---->   if (IN_MULTICAST(src4->s_addr) ||
            in_broadcast(*dst4, m->m_pkthdr.rcvif)) {
                struct inpcb *last;
                /*
                 * Deliver a multicast or broadcast datagram to *all* sockets
                 * for which the local and remote addresses and ports match
                 * those of the incoming datagram.  This allows more than
                 * one process to receive multi/broadcasts on the same port.

	udp6_realinput() may have the same problem:

        if (IN6_IS_ADDR_MULTICAST(dst6)
         || (af == AF_INET && IN_MULTICAST(src4->s_addr))) {
                struct in6pcb *last;       ^^^^^
                /*

>How-To-Repeat:
>Fix:
      "IN_MULTICAST(dst4->s_addr)" , I think (could not test it yet).
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: itojun 
State-Changed-When: Mon Dec 4 03:23:11 PST 2000 
State-Changed-Why:  
committed in main trunc.  sorry for the mess, i should have noticed this before 1.5 is finalized 
Responsible-Changed-From-To: kern-bug-people->itojun 
Responsible-Changed-By: itojun 
Responsible-Changed-When: Mon Dec 4 03:38:40 PST 2000 
Responsible-Changed-Why:  
mine 
State-Changed-From-To: feedback->closed 
State-Changed-By: itojun 
State-Changed-When: Mon Feb 5 05:56:01 PST 2001 
State-Changed-Why:  
fix merged into 1.5.1 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.