diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-01-30 21:11:55 +0100 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-02-14 17:17:29 +0100 |
commit | 0592db9630fdf7b9f624224b6d65e122364e7779 (patch) | |
tree | 798c52c0d2799a271d4663c25bb40b97fe46e516 /bfdd | |
parent | bfdd: echo-mode doesn't need poll to start/stop (diff) | |
download | frr-0592db9630fdf7b9f624224b6d65e122364e7779.tar.xz frr-0592db9630fdf7b9f624224b6d65e122364e7779.zip |
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>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfd_packet.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c index 1a7280075..1c55db39f 100644 --- a/bfdd/bfd_packet.c +++ b/bfdd/bfd_packet.c @@ -213,8 +213,16 @@ void ptm_bfd_snd(struct bfd_session *bfd, int fbit) cp.flags = 0; BFD_SETSTATE(cp.flags, bfd->ses_state); 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); + if (fbit == 0) + BFD_SETPBIT(cp.flags, bfd->polling); + cp.detect_mult = bfd->detect_mult; cp.len = BFD_PKT_LEN; cp.discrs.my_discr = htonl(bfd->discrs.my_discr); |