summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2006-07-06 13:03:39 +0000
committerclaudio <claudio@openbsd.org>2006-07-06 13:03:39 +0000
commit675ce83abf5eeee07a5ca497cc8f38daaaa301d9 (patch)
treed70b81c6868decbc13d92abd3ed70ec0530f5336
parentin this test, $SUDO is not used to gain privileges but to switch to nobody. (diff)
downloadwireguard-openbsd-675ce83abf5eeee07a5ca497cc8f38daaaa301d9.tar.xz
wireguard-openbsd-675ce83abf5eeee07a5ca497cc8f38daaaa301d9.zip
In rt_invalidate() skip all as_ext routes if routes matching a specific area
are invalidated. as_ext routes have a uninitalised area id (aka 0.0.0.0) and so bad stuff happend when area 0.0.0.0 was invalidated. Because of this the FIB and RIB got out of sync in some scenarios.
-rw-r--r--usr.sbin/ospfd/rde_spf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c
index fb62ec60762..1c84eae7898 100644
--- a/usr.sbin/ospfd/rde_spf.c
+++ b/usr.sbin/ospfd/rde_spf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_spf.c,v 1.54 2006/05/30 22:15:55 claudio Exp $ */
+/* $OpenBSD: rde_spf.c,v 1.55 2006/07/06 13:03:39 claudio Exp $ */
/*
* Copyright (c) 2005 Esben Norby <norby@openbsd.org>
@@ -674,6 +674,11 @@ rt_invalidate(struct area *area)
r->p_type != PT_TYPE2_EXT)
continue;
} else {
+ /* ignore all as_ext routes */
+ if (r->p_type == PT_TYPE1_EXT ||
+ r->p_type == PT_TYPE2_EXT)
+ continue;
+
/* look only at routes matching the area */
if (r->area.s_addr != area->id.s_addr)
continue;