From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 08:29:14 2011 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 34DC3106566C for ; Mon, 22 Aug 2011 08:29:14 +0000 (UTC) (envelope-from herman@cleverbridge.com) Received: from mail.cleverbridge.com (mail.cleverbridge.com [89.1.11.32]) by mx1.freebsd.org (Postfix) with ESMTP id E75458FC13 for ; Mon, 22 Aug 2011 08:29:13 +0000 (UTC) Received: from [10.0.38.109] (whistler.cgn.cleverbridge.com [10.0.38.109]) by mail.cleverbridge.com (Postfix) with ESMTP id 41B719C566B; Mon, 22 Aug 2011 10:12:04 +0200 (CEST) Message-ID: <4E520F54.3090904@cleverbridge.com> Date: Mon, 22 Aug 2011 10:12:04 +0200 From: Paul Herman User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: =?windows-1252?Q?Ask_Bj=F8rn_Hansen?= References: <201108190830.p7J8UJPW041136@freefall.freebsd.org> <70CAC026-8187-4080-8FAE-B9A494F8D4E5@develooper.com> In-Reply-To: <70CAC026-8187-4080-8FAE-B9A494F8D4E5@develooper.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-net@FreeBSD.org, Paul Herman Subject: Re: kern/127050: [carp] ipv6 does not work on carp interfaces [regression] 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: Mon, 22 Aug 2011 08:29:14 -0000 On 8/21/2011 1:47 AM, Ask Bjørn Hansen wrote: > > On Aug 19, 2011, at 1:30, Paul Herman wrote: > >> --------------010305010708060807000808 >> Content-Type: application/gzip; >> name="carp_ip6_alias.patch.gz" >> Content-Transfer-Encoding: base64 >> Content-Disposition: attachment; >> filename="carp_ip6_alias.patch.gz" > > I wanted to try it, but gzip doesn't seem to like that file … > > (downloaded from http://www.freebsd.org/cgi/query-pr.cgi?pr=127050&cat= ) It's base64 encoded of course -- works for me when I pipe the text into openssl base64 -d | zcat (zipped to preserve white spacing) For those craving instant satisfaction, here it is in plain text. -Paul. --- sys/netinet/ip_carp.c.orig 2011-08-19 07:52:56.000000000 +0000 +++ sys/netinet/ip_carp.c 2011-08-19 07:15:03.000000000 +0000 @@ -1670,9 +1670,11 @@ struct carp_if *cif; struct in6_ifaddr *ia, *ia_if; struct ip6_moptions *im6o = &sc->sc_im6o; + struct in6_multi *in6m; struct in6_addr in6; int own, error; + error = 0; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { @@ -1729,8 +1731,6 @@ } if (!sc->sc_naddrs6) { - struct in6_multi *in6m; - im6o->im6o_multicast_ifp = ifp; /* join CARP multicast address */ @@ -1745,24 +1745,24 @@ goto cleanup; im6o->im6o_membership[0] = in6m; im6o->im6o_num_memberships++; - - /* join solicited multicast address */ - bzero(&in6, sizeof(in6)); - in6.s6_addr16[0] = htons(0xff02); - in6.s6_addr32[1] = 0; - in6.s6_addr32[2] = htonl(1); - in6.s6_addr32[3] = sin6->sin6_addr.s6_addr32[3]; - in6.s6_addr8[12] = 0xff; - if (in6_setscope(&in6, ifp, NULL) != 0) - goto cleanup; - in6m = NULL; - error = in6_mc_join(ifp, &in6, NULL, &in6m, 0); - if (error) - goto cleanup; - im6o->im6o_membership[1] = in6m; - im6o->im6o_num_memberships++; } + /* join solicited multicast address */ + bzero(&in6, sizeof(in6)); + in6.s6_addr16[0] = htons(0xff02); + in6.s6_addr32[1] = 0; + in6.s6_addr32[2] = htonl(1); + in6.s6_addr32[3] = sin6->sin6_addr.s6_addr32[3]; + in6.s6_addr8[12] = 0xff; + if (in6_setscope(&in6, ifp, NULL) != 0) + goto cleanup; + in6m = NULL; + error = in6_mc_join(ifp, &in6, NULL, &in6m, 0); + if (error) + goto cleanup; + im6o->im6o_membership[1] = in6m; + im6o->im6o_num_memberships++; + if (!ifp->if_carp) { cif = malloc(sizeof(*cif), M_CARP, M_WAITOK|M_ZERO);