From f68114c1c397a939fd758af072c37d535f1de92f Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Thu, 24 Nov 2022 11:16:18 -0300 Subject: [PATCH] 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 --- bfdd/bfd_packet.c | 2 -- 1 file changed, 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 {