summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_decide.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-02-17 14:22:41 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-02-17 14:22:41 +0000
commit20e8412ded310b1f505273cc43fdc6b05bac041e (patch)
tree55e4548b6e54ba136e3215930cf6973fddf2dd52 /usr.sbin/bgpd/rde_decide.c
parentd0031e7cc36a4c279a48e08f99959b3c999f87fa (diff)
Make sure that we add the new prefix to the prefix list or bad things will
happen. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde_decide.c')
-rw-r--r--usr.sbin/bgpd/rde_decide.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_decide.c b/usr.sbin/bgpd/rde_decide.c
index 3a47ac152a5..b16e2a05757 100644
--- a/usr.sbin/bgpd/rde_decide.c
+++ b/usr.sbin/bgpd/rde_decide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_decide.c,v 1.27 2004/02/04 09:07:44 claudio Exp $ */
+/* $OpenBSD: rde_decide.c,v 1.28 2004/02/17 14:22:40 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -203,6 +203,10 @@ prefix_evaluate(struct prefix *p, struct pt_entry *pte)
if (prefix_cmp(p, xp) > 0) {
LIST_INSERT_BEFORE(xp, p, prefix_l);
break;
+ } else if (LIST_NEXT(xp, prefix_l) == NULL) {
+ /* if xp last element ... */
+ LIST_INSERT_AFTER(xp, p, prefix_l);
+ break;
}
}
}