Skip to content

Commit

Permalink
Merge pull request #15697 from zmw12306/bfd_check_Mflag
Browse files Browse the repository at this point in the history
bfdd: Add check for flag Multipoint (M)
  • Loading branch information
idryzhov authored Apr 12, 2024
2 parents 692f916 + 665ec41 commit b6e6656
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bfdd/bfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,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)) \
Expand Down
6 changes: 6 additions & 0 deletions bfdd/bfd_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,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");
Expand Down

0 comments on commit b6e6656

Please sign in to comment.