First Patch to get CARP on Dfly

Sepherosa Ziehau sepherosa at
Wed Mar 14 04:17:46 PDT 2007

On 3/14/07, Jonathan Buschmann <jonthn+dfly at> wrote:

After a few weeks of work and a delay of about 2 weeks we've got a
first patch that you can try.
Great work!

The work was done by :
  * Nicolas Riss <nicolas.riss at>
  * Baptiste Ritter <baptiste.ritter at>
  * and myself
Currently CARP with IPv4 is working on our side (many thanks to
VKERNEL for simplifying our tests and devs) but on IPv6 there are some
trouble even if the "election" of the MASTER is done, you can't ping the
virtual IP shared between the CARP group because the carp interface
doesn't reply to Neighbor Sollicitation.
There are some cleanups left to do. And we will add in a next patch
the modifications for the man pages.
And probably all the Macro *LOCK() in the file ip_carp.c could be improved.
To try the patch

# cd /usr/
# patch -p1 < carp.patch
add the two lines :
  pseudo-device   carp
  options CARP
in your kernel config
And rebuild a kernel
After the reboot configure each host see :

For the configuration see the man page of FreeBSD located at :
If you've got any comments on how to improve this patch don't hesitate
to tell us.
Why you want to comment out following assertion?

diff --git a/src/sys/net/ifq_var.h b/src/sys/net/ifq_var.h
index dfabe90..9cc2ce5 100644
--- a/src/sys/net/ifq_var.h
+++ b/src/sys/net/ifq_var.h
@@ -185,7 +185,7 @@ ifq_handoff(struct ifnet *_ifp, struct m
       int _error;
-       ASSERT_SERIALIZED(_ifp->if_serializer);
+/*     ASSERT_SERIALIZED(_ifp->if_serializer);*/
       _error = ifq_enqueue(&_ifp->if_snd, _m, _pa);
       if (_error == 0) {
               _ifp->if_obytes += _m->m_pkthdr.len;
Best Regards,
Live Free or Die

More information about the Kernel mailing list