summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde_rib.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index 554757c306a..f39e7b3eafc 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.61 2004/11/10 16:12:11 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.62 2004/11/19 09:59:27 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -247,9 +247,8 @@ path_link(struct rde_aspath *asp, struct rde_peer *peer)
LIST_INSERT_HEAD(head, asp, path_l);
LIST_INSERT_HEAD(&peer->path_h, asp, peer_l);
asp->peer = peer;
- asp->flags |= F_ATTR_LINKED;
-
nexthop_link(asp);
+ asp->flags |= F_ATTR_LINKED;
}
/*
@@ -764,9 +763,11 @@ nexthop_modify(struct rde_aspath *asp, struct bgpd_addr *nexthop, int flags,
return;
nh = nexthop_get(nexthop);
- nexthop_unlink(asp);
+ if (asp->flags & F_ATTR_LINKED)
+ nexthop_unlink(asp);
asp->nexthop = nh;
- nexthop_link(asp);
+ if (asp->flags & F_ATTR_LINKED)
+ nexthop_link(asp);
}
void