carp(4) is normaly using IPv4 multicast for its announcements. In case
there are no IPv4 addrs set IPv6 multicast will be used. But since the
code forgot to embed the oh so freaking magic scope into the multicast
address it failed to send the packet out.
I don't think anyone will OK this, so I will autocommit in about 2 days.
--
:wq Claudio
Index: sys/netinet/ip_carp.c
===================================================================
RCS file: /cvs/src/sys/netinet/ip_carp.c,v
retrieving revision 1.177
diff -u -p -r1.177 ip_carp.c
--- sys/netinet/ip_carp.c 2 Aug 2010 10:30:00 -0000 1.177
+++ sys/netinet/ip_carp.c 9 Aug 2010 13:06:00 -0000
@@ -1247,8 +1247,8 @@ carp_send_ad(void *v)
&ip6->ip6_src, sizeof(struct in6_addr));
/* set the multicast destination */
- ip6->ip6_dst.s6_addr8[0] = 0xff;
- ip6->ip6_dst.s6_addr8[1] = 0x02;
+ ip6->ip6_dst.s6_addr16[0] = htons(0xff02);
+ ip6->ip6_dst.s6_addr16[1] = htons(sc->sc_carpdev->if_index);
ip6->ip6_dst.s6_addr8[15] = 0x12;
ch_ptr = (void *)ip6 + sizeof(*ip6);