mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:24:43 +00:00
bfdd: fix bug on poll sequence
Poll and Final bits can't be set at the same time in a packet. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
8bd859f6d3
commit
0592db9630
@ -213,8 +213,16 @@ void ptm_bfd_snd(struct bfd_session *bfd, int fbit)
|
|||||||
cp.flags = 0;
|
cp.flags = 0;
|
||||||
BFD_SETSTATE(cp.flags, bfd->ses_state);
|
BFD_SETSTATE(cp.flags, bfd->ses_state);
|
||||||
BFD_SETDEMANDBIT(cp.flags, BFD_DEF_DEMAND);
|
BFD_SETDEMANDBIT(cp.flags, BFD_DEF_DEMAND);
|
||||||
BFD_SETPBIT(cp.flags, bfd->polling);
|
|
||||||
|
/*
|
||||||
|
* Polling and Final can't be set at the same time.
|
||||||
|
*
|
||||||
|
* RFC 5880, Section 6.5.
|
||||||
|
*/
|
||||||
BFD_SETFBIT(cp.flags, fbit);
|
BFD_SETFBIT(cp.flags, fbit);
|
||||||
|
if (fbit == 0)
|
||||||
|
BFD_SETPBIT(cp.flags, bfd->polling);
|
||||||
|
|
||||||
cp.detect_mult = bfd->detect_mult;
|
cp.detect_mult = bfd->detect_mult;
|
||||||
cp.len = BFD_PKT_LEN;
|
cp.len = BFD_PKT_LEN;
|
||||||
cp.discrs.my_discr = htonl(bfd->discrs.my_discr);
|
cp.discrs.my_discr = htonl(bfd->discrs.my_discr);
|
||||||
|
Loading…
Reference in New Issue
Block a user