On Wed, Feb 05, 2014 at 02:39:43AM +0100, Alexander Bluhm wrote:
> On Tue, Feb 04, 2014 at 07:44:42PM +0100, Ole Myhre wrote:
> > Small patch that make carp send na with router flag set when
> > net.inet6.ip6.forwarding=1. Otherwise clients will lose the default
> > gateway during failover if it was learned from ra.
>
> I think the patch is correct, OK bluhm@
Works nicely for me, too.
No more annoying IPv6 routing problems on autoconf hosts
during carp failover, yay!
> Note that a long line should be broken at 80 characters.
Here's a line-wrapped version of the diff which I intend to commit soon.
Index: ip_carp.c
===================================================================
RCS file: /cvs/src/sys/netinet/ip_carp.c,v
retrieving revision 1.220
diff -u -p -r1.220 ip_carp.c
--- ip_carp.c 22 Jan 2014 09:35:20 -0000 1.220
+++ ip_carp.c 5 Feb 2014 16:36:42 -0000
@@ -1352,7 +1352,8 @@ carp_send_na(struct carp_softc *sc)
in6 = &ifatoia6(ifa)->ia_addr.sin6_addr;
nd6_na_output(sc->sc_carpdev, &mcast, in6,
- ND_NA_FLAG_OVERRIDE, 1, NULL);
+ ND_NA_FLAG_OVERRIDE |
+ (ip6_forwarding ? ND_NA_FLAG_ROUTER : 0), 1, NULL);
DELAY(1000); /* XXX */
}
splx(s);