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.
Ole Myhre
Index: sys/netinet/ip_carp.c
===================================================================
RCS file: /cvs/src/sys/netinet/ip_carp.c,v
retrieving revision 1.209
diff -u -p -r1.209 ip_carp.c
--- sys/netinet/ip_carp.c 20 Jun 2013 12:03:40 -0000 1.209
+++ sys/netinet/ip_carp.c 4 Feb 2014 18:26:30 -0000
@@ -1354,7 +1354,7 @@ 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);