In a previous post, I noticed that Quagga was broken in 4.3.
After spending some hour to debug, I find were the stack overflow was.
It's not clear if it was an openbsd bug (strange route in the kernel
interface),
but it's clear for me that quagga don't make enought test before making
memcpy (still not a good idea).
I propose the following new patch file "patch-zebra_kernel_socket_c"
--- zebra/kernel_socket.c.orig Wed Aug 22 18:22:57 2007
+++ zebra/kernel_socket.c Wed May 14 18:14:47 2008
@@ -98,7 +98,8 @@ extern struct zebra_t zebrad;
{ \
void *pdest = (DEST); \
int len = SAROUNDUP ((PNT)); \
- if ((DEST) != NULL) \
+ if ( ((DEST) != NULL) && \
+ (len <= sizeof (union sockunion))) \
memcpy (pdest, (PNT), len); \
(PNT) += len; \
}
@@ -136,7 +137,7 @@ struct message rtm_type_str[] =
{RTM_REDIRECT, "RTM_REDIRECT"},
{RTM_MISS, "RTM_MISS"},
{RTM_LOCK, "RTM_LOCK"},
-#ifdef OLDADD
+#ifdef RTM_OLDADD
{RTM_OLDADD, "RTM_OLDADD"},
#endif /* RTM_OLDADD */
#ifdef RTM_OLDDEL
It work for me, but I don't know if it was the right solution.
I also commit a bug repport on the quagga bugzilla and I will wait for
comment, because I think it's real bug, and must be committed upstream.
--
Raphael MAZELIER