Skip to content

Commit

Permalink
bfdd: Add check for flag Multipoint (M)
Browse files Browse the repository at this point in the history
Signed-off-by: zmw12306 <[email protected]>
  • Loading branch information
zmw12306 committed Apr 7, 2024
1 parent 9b96394 commit cd09bd4
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -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)) \
Expand Down
5 changes: 5 additions & 0 deletions bfdd/bfd_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,11 @@ void bfd_recv_cb(struct event *t)
bs_final_handler(bfd);
}

if (BFD_GETMBIT(cp->flags)) {
/* Check non-zero Flag Multipoint (M) */
cp_debug(is_mhop, &peer, &local, ifindex, vrfid, "detect non-zero Multipoint (M) flag");
return;
}
/*
* Detection timeout calculation:
* The minimum detection timeout is the remote detection
Expand Down

0 comments on commit cd09bd4

Please sign in to comment.