]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: fix version bits check. 13675/head
authorzmw12306 <zmw12306@gmail.com>
Sat, 3 Jun 2023 19:08:34 +0000 (15:08 -0400)
committerzmw12306 <zmw12306@gmail.com>
Sat, 3 Jun 2023 19:08:34 +0000 (15:08 -0400)
The version of bfd pkt is represented by 3 bits in B[0].
Signed-off-by: zmw12306 <zmw12306@gmail.com>
bfdd/bfd.h

index 5451e66c23dfd476e32e889f2ab9cb8d869ab273..be0326151a558f64a45e49f5fb230889c057db89 100644 (file)
@@ -79,7 +79,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)