Skip to content

Commit

Permalink
bfdd: add check for flag M
Browse files Browse the repository at this point in the history
Signed-off-by: zmw12306 <[email protected]>
  • Loading branch information
zmw12306 committed Apr 12, 2024
1 parent 9b96394 commit 665ec41
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 @@ -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
6 changes: 6 additions & 0 deletions bfdd/bfd_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 665ec41

Please sign in to comment.