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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[email protected]"

Reply via email to