diff options
author | zmw12306 <zmw12306@gmail.com> | 2024-04-07 22:19:38 +0200 |
---|---|---|
committer | zmw12306 <zmw12306@gmail.com> | 2024-04-12 02:30:56 +0200 |
commit | 665ec41339659bef7f643c6df7aab034be0523ed (patch) | |
tree | 47817792b220b5607369af4bb17682bb9b8d607b /bfdd | |
parent | Merge pull request #13149 from pushpasis/mgmt_cleanup_zlog (diff) | |
download | frr-665ec41339659bef7f643c6df7aab034be0523ed.tar.xz frr-665ec41339659bef7f643c6df7aab034be0523ed.zip |
bfdd: add check for flag M
Signed-off-by: zmw12306 <zmw12306@gmail.com>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfd.h | 2 | ||||
-rw-r--r-- | bfdd/bfd_packet.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bfdd/bfd.h b/bfdd/bfd.h index 5451e66c2..c6dc0d613 100644 --- a/bfdd/bfd.h +++ b/bfdd/bfd.h @@ -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)) \ diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c index 311ce4d37..dadf9c25d 100644 --- a/bfdd/bfd_packet.c +++ b/bfdd/bfd_packet.c @@ -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"); |