From owner-freebsd-net@FreeBSD.ORG Thu Sep 4 17:50:18 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E54EDDEB; Thu, 4 Sep 2014 17:50:18 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD7AA1D41; Thu, 4 Sep 2014 17:50:17 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id t60so10575759wes.4 for ; Thu, 04 Sep 2014 10:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Si3IZl7M/LoNDZ9xEG6SxtCuklYCDWs2JyEHPg7Udrs=; b=yLBfWcXuNsTcgnhI7iry+OVJ5MLRyYqjBMXSit4O9BZpjb4Klvvk6rLfjoJCRNz0mi 5A1opKz1a2Y2ZSGfVvuAwEMHqtmIcyy5Lj6JuSsyUizl49efPeQ5O9kvp9dHcZbnkQaZ mdf4pXIcdpVT7WDtA6SQJXvjayJ/Y7OVmMQhISPQ/7uiyGMcZoBJ6vL2lsrfLRf/wkj8 3IwTsxu+LEubrxdNjVq528uOhQvOqpXz8Rzbg5G+zuuWLbfbkwo2k+BFYLrCFTcBg9W3 Wii03S3AYdpTtnHaGQfwOsYCEdkQ94bXNrw+vcE7xedEw2MeMkI7vGZ9T0jLk1utfkJx N+Ag== MIME-Version: 1.0 X-Received: by 10.180.75.49 with SMTP id z17mr7478845wiv.80.1409853012896; Thu, 04 Sep 2014 10:50:12 -0700 (PDT) Sender: jinmei.tatuya@gmail.com Received: by 10.194.123.164 with HTTP; Thu, 4 Sep 2014 10:50:12 -0700 (PDT) In-Reply-To: <3393302.jtrfEtP2nm@ralph.baldwin.cx> References: <54070758.2050405@FreeBSD.org> <3393302.jtrfEtP2nm@ralph.baldwin.cx> Date: Thu, 4 Sep 2014 10:50:12 -0700 X-Google-Sender-Auth: PUKMcJ_cIUCh2wieFcRnszAquq0 Message-ID: Subject: Re: [Bug 193246] Bug in IPv6 multicast join(), uncovered by Jenkins From: =?UTF-8?B?56We5piO6YGU5ZOJ?= To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: Craig Rodrigues , FreeBSD Net , bugzilla-noreply@freebsd.org, "Andrey V. Elsukov" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:50:19 -0000 At Thu, 04 Sep 2014 10:42:59 -0400, John Baldwin wrote: > > It looks like on Solaris, they support IPv4-mapped multicast addresses for > > IPV6, and things work when they create an IPv6 socket, and then put an > > IPv4-mapped multicast address in it. For Linux, they have specific > > code paths in that function which seem to force creating an IPv4 > > socket. > > >From looking at the source, it doesn't look like the Linux workaround (using > IP_ADD_MEMBERSHIP on an AF_INET6 socket) will work on FreeBSD. I'm not sure > how hard it would be to fix in6_mcast.c to support IPv4 groups. bms@ might > know. (In my understanding) in general, BSD variants intentionally limit the support for the APIs using to that standardized in RFC3493 because of issues such as those described in http://tools.ietf.org/html/draft-cmetz-v6ops-v4mapped-api-harmful-01 (where implications with multicast API are also discussed). So I suspect it'll be generally difficult to extend the support for IPv4-mapped IPv6 addresses. As usual in the case where a deployed application relies on non-standard, non-portable API, making the decision is difficult. Personally, I'd first consider dealing it in the JDK so it'll be more portable. (Even though there are only two OSes today: FreeBSD and Linux:-) that will be helpful for other BSD variants, and also for even more minor systems that don't support the non-standard API. -- JINMEI, Tatuya