Subject: kern/11629: two programs can't listen to the same multicast group
To: None <,>
From: None <>
List: netbsd-bugs
Date: 12/04/2000 03:20:19
>Number:         11629
>Category:       kern
>Synopsis:       two programs can't listen to the same multicast group
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 04 03:20:01 PST 2000
>Originator:     Zdenek Salvet
>Release:        1.5_BETA
Institute of Computer Science of Masaryk University, Brno, Czech Republic
System: NetBSD 1.5_BETA NetBSD 1.5_BETA (HORN_15BETA) #1: Fri Nov 10 14:38:35 MET 2000 i386

	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;       ^^^^^
      "IN_MULTICAST(dst4->s_addr)" , I think (could not test it yet).