From owner-cvs-src-old@FreeBSD.ORG Tue Apr 27 13:50:30 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAD8C1065774 for ; Tue, 27 Apr 2010 13:50:30 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BFE528FC26 for ; Tue, 27 Apr 2010 13:50:30 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o3RDoUJ7024615 for ; Tue, 27 Apr 2010 13:50:30 GMT (envelope-from bms@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o3RDoU7Y024614 for cvs-src-old@freebsd.org; Tue, 27 Apr 2010 13:50:30 GMT (envelope-from bms@repoman.freebsd.org) Message-Id: <201004271350.o3RDoU7Y024614@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to bms@repoman.freebsd.org using -f From: Bruce M Simpson Date: Tue, 27 Apr 2010 13:50:15 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sys/netinet in_mcast.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2010 13:50:31 -0000 bms 2010-04-27 13:50:15 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/netinet in_mcast.c Log: SVN rev 207274 on 2010-04-27 13:50:15Z by bms MFC 206452: Fix a few issues related to the legacy 4.4 BSD multicast APIs. IPv4 addresses can and do change during normal operation. Testing by pfSense developers exposed an issue where OpenOSPFD was using the IPv4 address to leave the OSPF link-scope multicast groups on a dynamic OpenVPN tun interface, rather than using RFC 3678 with the interface index, which won't be raced when the interface's addresses change. In inp_join_group(): If we are already a member of an ASM group, and IP_ADD_MEMBERSHIP or MCAST_JOIN_GROUP ioctls are re-issued, return EADDRINUSE as per the legacy 4.4BSD multicast API. This bends RFC 3678 slightly, but does not violate POLA for apps using the old API. It also stops us falling through to kicking IGMP state transactions in what is otherwise a no-op case. [This has already been dealt with in HEAD, but make it explicit before we MFC the change to 8.] In inp_leave_group(): Fix a bogus conditional. Move the ifp null check to ioctls MCAST_LEAVE* in the switch..case where it actually belongs. If an interface was specified, by primary IPv4 address, for ioctl IP_DROP_MEMBERSHIP or MCAST_LEAVE_GROUP (an ASM full leave operation), then and only then should we look up the ifp from the IPv4 address in mreqs.imr_interface. If not, we fall through to imo_match_group() as before, but only in the IP_DROP_MEMBERSHIP case. With these changes, the legacy 4.4BSD multicast API idempotence should be mostly preserved in the SSM enabled IPv4 stack. [Note: this is not a straight svn merge as head and 8 differ slightly] Found by: ermal (with pfSense) Revision Changes Path 1.27.2.5 +22 -4 src/sys/netinet/in_mcast.c