summaryrefslogtreecommitdiff
path: root/bgpd/bgp_snmp_bgp4v2.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-08-09 23:43:46 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-08-18 09:29:04 -0400
commit3e5a31b24ee6a3bdcc478fa9c842c5d1b69cd067 (patch)
tree7840d5c40b49d7ee03c461cdcd9ec0b32aa25f28 /bgpd/bgp_snmp_bgp4v2.c
parent5d527567357ed859eeb01062777f2c313ee08da2 (diff)
bgpd: Convert `struct peer_connection` to dynamically allocated
As part of the conversion to a `struct peer_connection` it will be desirable to have 2 pointers one for when we open a connection and one for when we receive a connection. Start this actual conversion over to this in `struct peer`. If this sounds confusing take a look at the bgp state machine for connections and how it resolves the processing of this router opening -vs- this router receiving an open. At some point in time the state machine decides that we are keeping one of the two connections. Future commits will allow us to untangle the peer/doppelganger duality with this abstraction. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_snmp_bgp4v2.c')
-rw-r--r--bgpd/bgp_snmp_bgp4v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_snmp_bgp4v2.c b/bgpd/bgp_snmp_bgp4v2.c
index 179970af11..5e77a9297b 100644
--- a/bgpd/bgp_snmp_bgp4v2.c
+++ b/bgpd/bgp_snmp_bgp4v2.c
@@ -265,7 +265,7 @@ static uint8_t *bgpv2PeerTable(struct variable *v, oid name[], size_t *length,
else
return SNMP_INTEGER(BGP_PEER_ADMIN_STATUS_RUNNING);
case BGP4V2_PEER_STATE:
- return SNMP_INTEGER(peer->connection.status);
+ return SNMP_INTEGER(peer->connection->status);
case BGP4V2_PEER_DESCRIPTION:
if (peer->desc)
return SNMP_STRING(peer->desc);