quagga does not handel multiple RTM_VERSIONs gracefully. Patch it to ignore
messages with wrong RTM_VERSION instead of trying to parse them and crashing doing so. OK rui@, jasper@, looks good mbalmer@
This commit is contained in:
parent
1e64c8b0b9
commit
55ed8e1d9a
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.10 2007/09/15 22:36:58 merdely Exp $
|
||||
# $OpenBSD: Makefile,v 1.11 2008/05/23 12:55:58 claudio Exp $
|
||||
|
||||
COMMENT= multi-threaded routing daemon
|
||||
|
||||
DISTNAME= quagga-0.99.9
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
SHARED_LIBS= ospf 0.0 \
|
||||
zebra 0.0
|
||||
CATEGORIES= net
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-zebra_kernel_socket_c,v 1.3 2007/09/12 20:31:18 rui Exp $
|
||||
--- zebra/kernel_socket.c.orig Wed Aug 22 17:22:57 2007
|
||||
+++ zebra/kernel_socket.c Tue Sep 11 16:52:21 2007
|
||||
$OpenBSD: patch-zebra_kernel_socket_c,v 1.4 2008/05/23 12:55:58 claudio Exp $
|
||||
--- zebra/kernel_socket.c.orig Wed Aug 22 18:22:57 2007
|
||||
+++ zebra/kernel_socket.c Tue Oct 9 23:54:58 2007
|
||||
@@ -136,7 +136,7 @@ struct message rtm_type_str[] =
|
||||
{RTM_REDIRECT, "RTM_REDIRECT"},
|
||||
{RTM_MISS, "RTM_MISS"},
|
||||
@ -10,3 +10,14 @@ $OpenBSD: patch-zebra_kernel_socket_c,v 1.3 2007/09/12 20:31:18 rui Exp $
|
||||
{RTM_OLDADD, "RTM_OLDADD"},
|
||||
#endif /* RTM_OLDADD */
|
||||
#ifdef RTM_OLDDEL
|
||||
@@ -705,9 +705,7 @@ rtm_read_mesg (struct rt_msghdr *rtm,
|
||||
|
||||
/* rt_msghdr version check. */
|
||||
if (rtm->rtm_version != RTM_VERSION)
|
||||
- zlog (NULL, LOG_WARNING,
|
||||
- "Routing message version different %d should be %d."
|
||||
- "This may cause problem\n", rtm->rtm_version, RTM_VERSION);
|
||||
+ return 0;
|
||||
|
||||
/* Be sure structure is cleared */
|
||||
memset (dest, 0, sizeof (union sockunion));
|
||||
|
Loading…
x
Reference in New Issue
Block a user