Subject: port-i386/37618: Cannot send and receive data when joining to multicast address FF15:0:0:0:0:0:0:1234 on NetBSD/x86 3.1
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <tohieuthao@yahoo.com>
List: netbsd-bugs
Date: 12/26/2007 10:55:00
>Number:         37618
>Category:       port-i386
>Synopsis:       Cannot send and receive data when joining to multicast address FF15:0:0:0:0:0:0:1234 on NetBSD/x86 3.1
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 26 10:55:00 +0000 2007
>Originator:     Thao To
>Release:        NetBSD i386 3.1.1
>Organization:
GCS
>Environment:
NetBSD netbsd 3.1.1 NetBSD 3.1.1 (GENERIC) #0: Sun Jul  1 08:48:35 PDT 2007  builds@wb42:/home/builds/ab/netbsd-3-1-1-RELEASE/i386/200707010939Z-obj/home/builds/ab/netbsd-3-1-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386
>Description:
I have a multicast issue when testing joining to multicast group and trying to send and receive the data on it.

Behavior of client: [send6.c] See a source code below.
- create a IPv6 socket.
- bind to any address ::0
- send "hello world" string to multicast group "FF15:0:0:0:0:0:0:1234" by "sendto" function.
- receive a response message from server by "recvfrom" function.

Behavior of server: [recv6.c] See a source code below.
- create a IPv6 socket
- bind to any address ::0
- set network interface index by setsockopt(IPPROTO_IPV6, IPV6_MULTICAST_IF)
- join to multicast group by setsockopt function (IPPROTO_IPV6, IPV6_MULTICAST_IF)
- listen and receive data from client by "recvfrom" function.

The problem was:
1. Client and server ran on the same machine (NetBSD/x86 3.1.1) by using default network interface index (it means Zero (0)).
Result: Could send data and receive data.
[Console 1]
# recv6 
>>>>> socket 3 has IPPROTO_IPV6/IPV6_MULTICAST_IF=0 to -1
>>>>> socket 3 join the multicast group (address ff15:0:0:0:0:0:0:1234) index 0
>>>>> my address 0:0:0:0:0:0:0:0:60177

>Fix:

Unknown