]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: fix version bits check. 13760/head
authorzmw12306 <zmw12306@gmail.com>
Sat, 3 Jun 2023 19:08:34 +0000 (15:08 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sun, 11 Jun 2023 11:17:31 +0000 (11:17 +0000)
The version of bfd pkt is represented by 3 bits in B[0].
Signed-off-by: zmw12306 <zmw12306@gmail.com>
(cherry picked from commit 3f658e8b1cfc82e1644cc36fcbc1554c70f558d0)

bfdd/bfd.h

index 69529aba171a901682aa7279e6587f2d6a528344..6c5a1e921618a755461cbc672adb2372f270e94c 100644 (file)
@@ -93,7 +93,7 @@ struct bfd_echo_pkt {
 
 
 /* Macros for manipulating control packets */
-#define BFD_VERMASK 0x03
+#define BFD_VERMASK 0x07
 #define BFD_DIAGMASK 0x1F
 #define BFD_GETVER(diag) ((diag >> 5) & BFD_VERMASK)
 #define BFD_SETVER(diag, val) ((diag) |= (val & BFD_VERMASK) << 5)