summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-12-05 13:18:26 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-12-05 13:18:26 +0000
commitf0449af2c4fc3c57615c8a7651be1939f01c8a45 (patch)
treeb8f706d87e73ab865ff9f37a099d7a7738162a1c /usr.sbin/ospfd
parentf10b5c0e25ce9009dcc0a5654bfeaa586412ba14 (diff)
Optimize rde_redistribute() a bit and remove two unneeded and way to verbose
log_debug() messages. OK norby@
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r--usr.sbin/ospfd/rde.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c
index 8d223f92992..b9c12a7850e 100644
--- a/usr.sbin/ospfd/rde.c
+++ b/usr.sbin/ospfd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.33 2005/11/04 10:46:23 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.34 2005/12/05 13:18:25 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -587,8 +587,6 @@ rde_dispatch_parent(int fd, short event, void *bula)
}
memcpy(&kr, imsg.data, sizeof(kr));
- log_debug("rde: new announced net %s/%d",
- inet_ntoa(kr.prefix), kr.prefixlen);
if ((lsa = rde_asext_get(&kr)) != NULL) {
v = lsa_find(NULL, lsa->hdr.type,
lsa->hdr.ls_id, lsa->hdr.adv_rtr);
@@ -603,8 +601,6 @@ rde_dispatch_parent(int fd, short event, void *bula)
}
memcpy(&kr, imsg.data, sizeof(kr));
- log_debug("rde: removing announced net %s/%d",
- inet_ntoa(kr.prefix), kr.prefixlen);
if ((lsa = rde_asext_put(&kr)) != NULL) {
v = lsa_find(NULL, lsa->hdr.type,
lsa->hdr.ls_id, lsa->hdr.adv_rtr);
@@ -936,6 +932,10 @@ rde_redistribute(struct kroute *kr)
(kr->flags & F_CONNECTED))
rv = 1;
+ /* route does not match redistribute_flags */
+ if (rv == 0)
+ return (0);
+
/* interface is not up and running so don't announce */
if (kif_validate(kr->ifindex) == 0)
return (0);