summaryrefslogtreecommitdiffstats
path: root/bfdd/bfd.h
diff options
context:
space:
mode:
authorlynnemorrison <lynne.morrison@ibm.com>2022-06-07 01:40:17 +0200
committerlynnemorrison <lynne.morrison@ibm.com>2022-06-27 22:21:08 +0200
commit57485b0b4f84cf145badc9d1deb3add734936fc4 (patch)
tree50197fe2ff9933dcc6a824a02a371d7618721fe9 /bfdd/bfd.h
parentMerge pull request #11314 from chiragshah6/fdev2 (diff)
downloadfrr-57485b0b4f84cf145badc9d1deb3add734936fc4.tar.xz
frr-57485b0b4f84cf145badc9d1deb3add734936fc4.zip
bfdd: add IPv4 BFD Echo support that matches RFC
Modify the existing BFD Echo code to send an Echo message that will be looped in the peers forwarding plane. The existing Echo code only works with other FRR implementations because the Echo packet must go up to BFD to be turned around and forwarded back to the local router. The new BFD Echo code sets the src/dst IP of the packet to be the local router's IP and sets the dest MAC to be the peers MAC address. The peer receives the packet and because it is not it's IP address it forwards it back to the local router. Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
Diffstat (limited to 'bfdd/bfd.h')
-rw-r--r--bfdd/bfd.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfdd/bfd.h b/bfdd/bfd.h
index 6aa9e0058..48a1e0bc3 100644
--- a/bfdd/bfd.h
+++ b/bfdd/bfd.h
@@ -168,9 +168,10 @@ enum bfd_session_flags {
* expires
*/
BFD_SESS_FLAG_SHUTDOWN = 1 << 7, /* disable BGP peer function */
- BFD_SESS_FLAG_CONFIG = 1 << 8, /* Session configured with bfd NB API */
- BFD_SESS_FLAG_CBIT = 1 << 9, /* CBIT is set */
+ BFD_SESS_FLAG_CONFIG = 1 << 8, /* Session configured with bfd NB API */
+ BFD_SESS_FLAG_CBIT = 1 << 9, /* CBIT is set */
BFD_SESS_FLAG_PASSIVE = 1 << 10, /* Passive mode */
+ BFD_SESS_FLAG_MAC_SET = 1 << 11, /* MAC of peer known */
};
/*
@@ -290,6 +291,8 @@ struct bfd_session {
struct peer_label *pl;
struct bfd_dplane_ctx *bdc;
+ struct sockaddr_any local_address;
+ uint8_t peer_hw_addr[ETH_ALEN];
struct interface *ifp;
struct vrf *vrf;
@@ -554,6 +557,7 @@ int bp_echov6_socket(const struct vrf *vrf);
void ptm_bfd_snd(struct bfd_session *bfd, int fbit);
void ptm_bfd_echo_snd(struct bfd_session *bfd);
+void ptm_bfd_echo_fp_snd(struct bfd_session *bfd);
void bfd_recv_cb(struct thread *t);