]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: add check for flag M 15697/head
authorzmw12306 <zmw12306@gmail.com>
Sun, 7 Apr 2024 20:19:38 +0000 (16:19 -0400)
committerzmw12306 <zmw12306@gmail.com>
Fri, 12 Apr 2024 00:30:56 +0000 (20:30 -0400)
Signed-off-by: zmw12306 <zmw12306@gmail.com>
bfdd/bfd.h
bfdd/bfd_packet.c

index 5451e66c23dfd476e32e889f2ab9cb8d869ab273..c6dc0d613714f05138f28c351719598181f42285 100644 (file)
@@ -89,6 +89,8 @@ struct bfd_echo_pkt {
 #define BFD_CBIT 0x08
 #define BFD_ABIT 0x04
 #define BFD_DEMANDBIT 0x02
+#define BFD_MBIT             0x01
+#define BFD_GETMBIT(flags)    (flags & BFD_MBIT)
 #define BFD_SETDEMANDBIT(flags, val)                                           \
        {                                                                      \
                if ((val))                                                     \
index 311ce4d37905d167381d2bfe9f625767f3cbf0ea..dadf9c25d75665670247c8800234f87cefd24c32 100644 (file)
@@ -862,6 +862,12 @@ void bfd_recv_cb(struct event *t)
                return;
        }
 
+       if (BFD_GETMBIT(cp->flags)) {
+               cp_debug(is_mhop, &peer, &local, ifindex, vrfid,
+                        "detect non-zero Multipoint (M) flag");
+               return;
+       }
+
        if (cp->discrs.my_discr == 0) {
                cp_debug(is_mhop, &peer, &local, ifindex, vrfid,
                         "'my discriminator' is zero");