From 96c2879880889126b957b752a1c45da896cb1ae9 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 26 Mar 2021 20:03:09 +0800 Subject: [PATCH] common/pick_address: Allow binding on loopback iface in 6147c0917157efd2d35610e759685656a4989abb, "lo" is also skipped when daemon is trying to find an address to bind. but that change reverts the fix of 201b59204374ebdab91bb554b986577a97b19c36, to address the problem. an option named "ms_bind_exclude_lo_iface" is added, it defaults to "true". but it can be changed to false to allow daemon to bind on "lo". Fixes: https://tracker.ceph.com/issues/50012 Signed-off-by: Kefu Chai (cherry picked from commit 7f01d36a2ca0576f1ff103ae3fa7c3662e93b722) --- src/common/options.cc | 5 +++++ src/common/pick_address.cc | 42 +++++++++++++++++++++++++---------- src/common/pick_address.h | 2 ++ src/test/test_ipaddr.cc | 45 ++++++++++++++++++++++++++++++-------- 4 files changed, 74 insertions(+), 20 deletions(-) diff --git a/src/common/options.cc b/src/common/options.cc index 96bbf56c1a023..0e76f628ed8b5 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1019,6 +1019,11 @@ std::vector