summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorDenis Ovsienko <linux@pilot.org.ua>2007-08-17 14:16:30 +0000
committerDenis Ovsienko <linux@pilot.org.ua>2007-08-17 14:16:30 +0000
commit6da598018c6f866694ecb80a391815a40daaa951 (patch)
treedbfe3daef285536d13e748584a6358dee0100c6b /zebra
parent03e232a4588187992f3538985d541289dc272464 (diff)
Fixed bug #394 "RTF_DONE is ignored in rtm_read()"
Diffstat (limited to 'zebra')
-rw-r--r--zebra/ChangeLog5
-rw-r--r--zebra/kernel_socket.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 7a23ace4..02eede81 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-17 Denis Ovsienko
+
+ * kernel_socket.c: (rtm_read) Ignore any routing socket messages
+ without RTF_DONE flag set, as they are just noise for us.
+
2007-08-14 Denis Ovsienko
* zebra_rib.c: (nexthop_active_update) Added a comment
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 9d33dd44..9d2310b9 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -741,6 +741,8 @@ rtm_read (struct rt_msghdr *rtm)
/* Read destination and netmask and gateway from rtm message
structure. */
flags = rtm_read_mesg (rtm, &dest, &mask, &gate, ifname, &ifnlen);
+ if (!(flags & RTF_DONE))
+ return;
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug ("%s: got rtm of type %d (%s)", __func__, rtm->rtm_type,
LOOKUP (rtm_type_str, rtm->rtm_type));
@@ -794,8 +796,6 @@ rtm_read (struct rt_msghdr *rtm)
{
char buf[INET_ADDRSTRLEN], gate_buf[INET_ADDRSTRLEN];
int ret;
- if (!(flags & RTF_DONE))
- return;
if (! IS_ZEBRA_DEBUG_RIB)
return;
ret = rib_lookup_ipv4_route (&p, &gate);