diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-06-23 04:26:52 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-06-23 04:26:52 +0000 |
commit | f2cb519680bc0d694279a808dc6dd3f8df6c60b2 (patch) | |
tree | 2a9e8374aeb97231c924f64a3828f70599aad9ff /usr.sbin/ospfd | |
parent | 0e499d22151d61ae999b6cfa20c3ee6e165fb3c5 (diff) |
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')
-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) { |