mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 23:58:44 +00:00
bgpd: fix uninitialized result code
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
e11eeb8ce0
commit
e3c7270d49
@ -2078,6 +2078,7 @@ int bgp_process_packet(struct thread *thread)
|
|||||||
peer = THREAD_ARG(thread);
|
peer = THREAD_ARG(thread);
|
||||||
rpkt_quanta_old = atomic_load_explicit(&peer->bgp->rpkt_quanta,
|
rpkt_quanta_old = atomic_load_explicit(&peer->bgp->rpkt_quanta,
|
||||||
memory_order_relaxed);
|
memory_order_relaxed);
|
||||||
|
fsm_update_result = 0;
|
||||||
|
|
||||||
/* Guard against scheduled events that occur after peer deletion. */
|
/* Guard against scheduled events that occur after peer deletion. */
|
||||||
if (peer->status == Deleted || peer->status == Clearing)
|
if (peer->status == Deleted || peer->status == Clearing)
|
||||||
@ -2167,6 +2168,13 @@ int bgp_process_packet(struct thread *thread)
|
|||||||
"%s: BGP CAPABILITY receipt failed for peer: %s",
|
"%s: BGP CAPABILITY receipt failed for peer: %s",
|
||||||
__FUNCTION__, peer->host);
|
__FUNCTION__, peer->host);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
/* The message type should have been sanitized before we
|
||||||
|
* ever got
|
||||||
|
* here. Receipt of a message with an invalid header at
|
||||||
|
* this point is
|
||||||
|
* indicative of a security issue. */
|
||||||
|
assert (!"Message of invalid type received during input processing");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete processed packet */
|
/* delete processed packet */
|
||||||
@ -2177,6 +2185,8 @@ int bgp_process_packet(struct thread *thread)
|
|||||||
/* Update FSM */
|
/* Update FSM */
|
||||||
if (mprc != BGP_PACKET_NOOP)
|
if (mprc != BGP_PACKET_NOOP)
|
||||||
fsm_update_result = bgp_event_update(peer, mprc);
|
fsm_update_result = bgp_event_update(peer, mprc);
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
|
||||||
/* If peer was deleted, do not process any more packets. This is
|
/* If peer was deleted, do not process any more packets. This is
|
||||||
* usually
|
* usually
|
||||||
|
Loading…
Reference in New Issue
Block a user