From owner-freebsd-net@FreeBSD.ORG Wed Jun 23 06:03:48 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17710106564A for ; Wed, 23 Jun 2010 06:03:48 +0000 (UTC) (envelope-from mahan@mahan.org) Received: from ns.mahan.org (ns.mahan.org [67.116.10.138]) by mx1.freebsd.org (Postfix) with ESMTP id E79328FC0A for ; Wed, 23 Jun 2010 06:03:47 +0000 (UTC) Received: from Gypsy.mahan.org (crowTrobot [67.116.10.140]) by ns.mahan.org (8.13.6/8.13.6) with ESMTP id o5N64UQq046218 for ; Tue, 22 Jun 2010 23:04:30 -0700 (PDT) (envelope-from mahan@mahan.org) Message-ID: <4C21A3C2.9050002@mahan.org> Date: Tue, 22 Jun 2010 23:03:46 -0700 From: Patrick Mahan User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Multicast under FBSD 8.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2010 06:03:48 -0000 All, Hoping for a little insight as I am not a user of multicast nor do I know much about the servers that use them. In my day job, I am helping with the moving of my company's product from FreeBSD 6.2 (i386) to FreeBSD 8.0 (amd64). One of the daemons wants to use 224.0.0.9 (routed? rip?) multicast group. The problem is this worked fine on 6.2 but when we moved to 8.0 the daemon started reporting "Network unreachable" errors when it was trying to send a packet out to the multicast group. I tracked it down to the following in the routing table: % netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.10.1.1 UG 0 0 bce0 10.10.0.0/16 link#5 U 3 1253 bce0 ... 224.0.0.2 127.0.0.1 UH 0 0 lo0 224.0.0.9 127.0.0.1 UH 0 0 lo0 Notice that 224.0.0.9 has a route pointing to the loopback interface, even though the code uses the IP_MULTICAST_IF socket option to specify the interface. If this entry does not exist or points to a true physical interface, then there is no issue. I did some research on this and found this code all changed in in_pcb.c as part of revision 105629 for FreeBSD 7.2. But I don't understand why he change and why the loopback was no longer allowed. I get asked daily by the developers of this daemon for the reason, so I was hoping to get some enlightment here. Thanks for listening, Patrick