summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_bfd.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-11-12 17:32:06 +0100
committerIgor Ryzhov <iryzhov@nfware.com>2021-11-12 17:32:06 +0100
commit5b7586900a0927e9d22907c86d6742bd3bd996b5 (patch)
treef6524bfdc97c42ad66445b8705efcde0cba1f2c2 /bgpd/bgp_bfd.c
parentMerge pull request #10033 from donaldsharp/bgp_max_no_go (diff)
downloadfrr-5b7586900a0927e9d22907c86d6742bd3bd996b5.tar.xz
frr-5b7586900a0927e9d22907c86d6742bd3bd996b5.zip
bgpd: fix source-address for BFD sessions when using update-source IFNAME
When "update-source IFNAME" is used for the neighbor, p->update_source is set to NULL, so we can't use it as a source address and should use the address from p->su_local. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'bgpd/bgp_bfd.c')
-rw-r--r--bgpd/bgp_bfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index f23e6b2e9..ed54f42b0 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -163,7 +163,7 @@ void bgp_peer_bfd_update_source(struct peer *p)
return;
/* Figure out the correct source to use. */
- if (CHECK_FLAG(p->flags, PEER_FLAG_UPDATE_SOURCE))
+ if (CHECK_FLAG(p->flags, PEER_FLAG_UPDATE_SOURCE) && p->update_source)
source = p->update_source;
else
source = p->su_local;