summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-02-26 09:59:45 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-02-26 09:59:45 +0000
commitcca10daf5e9327386be605f52c045556bebfe7b4 (patch)
tree4598356c6f3a1c59690b2b60eedc8a29d7317579
parent32fa9d5f07e407c3dfb866756f23852c323195d3 (diff)
Swap order of RB tree sorting from type, ls_id, adv_rtr to type, adv_rtr,
ls_id. This is needed since sometimes the ls_id is not known and we need to walk part of the tree.
-rw-r--r--usr.sbin/ospf6d/rde_lsdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ospf6d/rde_lsdb.c b/usr.sbin/ospf6d/rde_lsdb.c
index 8efec336590..4da07dcb711 100644
--- a/usr.sbin/ospf6d/rde_lsdb.c
+++ b/usr.sbin/ospf6d/rde_lsdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_lsdb.c,v 1.28 2010/02/23 11:17:23 claudio Exp $ */
+/* $OpenBSD: rde_lsdb.c,v 1.29 2010/02/26 09:59:44 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -54,14 +54,14 @@ lsa_compare(struct vertex *a, struct vertex *b)
return (-1);
if (a->type > b->type)
return (1);
- if (a->ls_id < b->ls_id)
- return (-1);
- if (a->ls_id > b->ls_id)
- return (1);
if (a->adv_rtr < b->adv_rtr)
return (-1);
if (a->adv_rtr > b->adv_rtr)
return (1);
+ if (a->ls_id < b->ls_id)
+ return (-1);
+ if (a->ls_id > b->ls_id)
+ return (1);
return (0);
}