summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-06-13 17:16:08 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-06-13 17:16:08 +0000
commitf1d698d2950c72fe4453279d66d4d4b34f4e6859 (patch)
tree16a227365f3ec4566ff2605bfaeb971e67acabc2 /usr.sbin/ospfd
parent07f12b53833edbc0410dbe749af247d0edd53475 (diff)
Ingnore updates that did not change the route. This enhances the signal to
nois ratio on the routing socket. OK norby@ reyk@
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r--usr.sbin/ospfd/kroute.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c
index 3115903a2a9..ad33f014974 100644
--- a/usr.sbin/ospfd/kroute.c
+++ b/usr.sbin/ospfd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.49 2007/06/12 04:23:47 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.50 2007/06/13 17:16:07 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -204,6 +204,13 @@ kr_change(struct kroute *kroute)
htonl(INADDR_LOOPBACK & IN_CLASSA_NET))
return (0);
+ /*
+ * Ingnore updates that did not change the route.
+ * Currently only the nexthop can change.
+ */
+ if (kr && kr->r.nexthop.s_addr == kroute->nexthop.s_addr)
+ return (0);
+
if (send_rtmsg(kr_state.fd, action, kroute) == -1)
return (-1);