summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_fsm.c12
-rw-r--r--bgpd/bgp_route.c2
2 files changed, 14 insertions, 0 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 9624adfbe2..8f1fdea856 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -2108,6 +2108,7 @@ static enum bgp_fsm_state_progress bgp_establish(struct peer *peer)
enum bgp_fsm_state_progress ret = BGP_FSM_SUCCESS;
struct peer *other;
int status;
+ struct peer *orig = peer;
other = peer->doppelganger;
hash_release(peer->bgp->peerhash, peer);
@@ -2117,6 +2118,17 @@ static enum bgp_fsm_state_progress bgp_establish(struct peer *peer)
peer = peer_xfer_conn(peer);
if (!peer) {
flog_err(EC_BGP_CONNECT, "%%Neighbor failed in xfer_conn");
+
+ /*
+ * A failure of peer_xfer_conn but not putting the peers
+ * back in the hash ends up with a situation where incoming
+ * connections are rejected, as that the peer is not found
+ * when a lookup is done
+ */
+ (void)hash_get(orig->bgp->peerhash, orig, hash_alloc_intern);
+ if (other)
+ (void)hash_get(other->bgp->peerhash, other,
+ hash_alloc_intern);
return BGP_FSM_FAILURE;
}
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 54b2978880..43cefa2109 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -12869,6 +12869,8 @@ DEFPY(show_ip_bgp, show_ip_bgp_cmd,
rpki_target_state = RPKI_VALID;
else if (argv_find(argv, argc, "invalid", &idx))
rpki_target_state = RPKI_INVALID;
+ else if (argv_find(argv, argc, "notfound", &idx))
+ rpki_target_state = RPKI_NOTFOUND;
}
/* Display prefixes with matching version numbers */