summaryrefslogtreecommitdiff
path: root/bfdd/bfd_packet.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2022-11-24 11:16:18 -0300
committerRafael Zalamena <rzalamena@opensourcerouting.org>2022-11-24 11:16:18 -0300
commitf68114c1c397a939fd758af072c37d535f1de92f (patch)
tree0cda1e7c5ddd7f2aa2612e1f00f3b44a0de1658f /bfdd/bfd_packet.c
parentf6ebf84d43850bcbcde53aa7e5058e21c1d71fa6 (diff)
bfdd: fix IPv4 socket source selection
The imported BFD code had some logic to ignore the source address when using single hop IPv4. The BFD peer socket function should allow the source to be selected so we can: 1. Select the source address in the outgoing packets 2. Only receive packets from that specific source Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd/bfd_packet.c')
-rw-r--r--bfdd/bfd_packet.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c
index 382f78a0f6..6397aa5747 100644
--- a/bfdd/bfd_packet.c
+++ b/bfdd/bfd_packet.c
@@ -1397,8 +1397,6 @@ int bp_peer_socket(const struct bfd_session *bs)
sin.sin_len = sizeof(sin);
#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */
memcpy(&sin.sin_addr, &bs->key.local, sizeof(sin.sin_addr));
- if (CHECK_FLAG(bs->flags, BFD_SESS_FLAG_MH) == 0)
- sin.sin_addr.s_addr = INADDR_ANY;
pcount = 0;
do {