Date: Mon, 22 Aug 2011 10:12:04 +0200 From: Paul Herman <herman@cleverbridge.com> To: =?windows-1252?Q?Ask_Bj=F8rn_Hansen?= <ask@develooper.com> Cc: freebsd-net@FreeBSD.org, Paul Herman <pherman@frenchfries.net> Subject: Re: kern/127050: [carp] ipv6 does not work on carp interfaces [regression] Message-ID: <4E520F54.3090904@cleverbridge.com> In-Reply-To: <70CAC026-8187-4080-8FAE-B9A494F8D4E5@develooper.com> References: <201108190830.p7J8UJPW041136@freefall.freebsd.org> <70CAC026-8187-4080-8FAE-B9A494F8D4E5@develooper.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E520F54.3090904>