diff options
author | dlg <dlg@openbsd.org> | 2010-06-23 04:26:51 +0000 |
---|---|---|
committer | dlg <dlg@openbsd.org> | 2010-06-23 04:26:51 +0000 |
commit | d11a1a20c287aa3da960efc1e619956584747c6d (patch) | |
tree | b4636f9ebf385d21ddd49985cfc9388f2a5cb92e /usr.sbin/ospfd/kroute.c | |
parent | switch ami over to using mutexes instead of splbio to protect itself. this (diff) | |
download | wireguard-openbsd-d11a1a20c287aa3da960efc1e619956584747c6d.tar.xz wireguard-openbsd-d11a1a20c287aa3da960efc1e619956584747c6d.zip |
fetchifs and fetchtable return -1 on error, not !0. in fact, they return
the number of bytes they processed from the kernel on success, so testing
against 0 meant that the fib reload code always dropped out early.
found by andrew sallaway
ok claudio@
Diffstat (limited to 'usr.sbin/ospfd/kroute.c')
-rw-r--r-- | usr.sbin/ospfd/kroute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c index 9d66bf3b5e1..d95bad201de 100644 --- a/usr.sbin/ospfd/kroute.c +++ b/usr.sbin/ospfd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.81 2010/05/18 15:19:07 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.82 2010/06/23 04:26:51 dlg Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -363,7 +363,7 @@ kr_fib_reload(void) kr_state.fib_serial++; - if (fetchifs(0) != 0 || fetchtable() != 0) + if (fetchifs(0) == -1 || fetchtable() == -1) return; for (kr = RB_MIN(kroute_tree, &krt); kr != NULL; kr = krn) { |