mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-10 10:49:01 +00:00
Merge pull request #5148 from qlyoung/fix-bgp-read-assert
bgpd: move assert out of error case
This commit is contained in:
commit
ad63bc68f3
@ -242,13 +242,13 @@ static int bgp_process_reads(struct thread *thread)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(ringbuf_space(peer->ibuf_work) >= BGP_MAX_PACKET_SIZE);
|
|
||||||
|
|
||||||
/* handle invalid header */
|
/* handle invalid header */
|
||||||
if (fatal) {
|
if (fatal) {
|
||||||
/* wipe buffer just in case someone screwed up */
|
/* wipe buffer just in case someone screwed up */
|
||||||
ringbuf_wipe(peer->ibuf_work);
|
ringbuf_wipe(peer->ibuf_work);
|
||||||
} else {
|
} else {
|
||||||
|
assert(ringbuf_space(peer->ibuf_work) >= BGP_MAX_PACKET_SIZE);
|
||||||
|
|
||||||
thread_add_read(fpt->master, bgp_process_reads, peer, peer->fd,
|
thread_add_read(fpt->master, bgp_process_reads, peer, peer->fd,
|
||||||
&peer->t_read);
|
&peer->t_read);
|
||||||
if (added_pkt)
|
if (added_pkt)
|
||||||
|
Loading…
Reference in New Issue
Block a user