]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/ipaddr: Allow binding on lo 39342/head
authorThomas Goirand <zigo@debian.org>
Fri, 15 Jan 2021 09:50:05 +0000 (10:50 +0100)
committerNathan Cutler <ncutler@suse.com>
Sun, 7 Feb 2021 12:58:02 +0000 (13:58 +0100)
Commmit 5cf0fa872231f4eaf8ce6565a04ed675ba5b689b, solves the issue that
the osd can't restart after seting a virtual local loopback IP. However,
this commit also prevents a bgp-to-the-host over unumbered Ipv6
local-link is setup, where OSD typically are bound to the lo interface.

To solve this, this single char patch simply checks against "lo:" to
match only virtual interfaces instead of anything that starts with "lo".

Fixes: https://tracker.ceph.com/issues/48893
Signed-off-by: Thomas Goirand <zigo@debian.org>
(cherry picked from commit 201b59204374ebdab91bb554b986577a97b19c36)

src/common/ipaddr.cc

index a899df697856abeead56a81454425a1708549acd..520b7aea1a698a7ca862764ae3c340e2dfd871ab 100644 (file)
@@ -56,7 +56,7 @@ const struct ifaddrs *find_ipv4_in_subnet(const struct ifaddrs *addrs,
     if (addrs->ifa_addr == NULL)
       continue;
 
-    if (boost::starts_with(addrs->ifa_name, "lo"))
+    if (boost::starts_with(addrs->ifa_name, "lo:"))
       continue;
 
     if (numa_node >= 0 && !match_numa_node(addrs->ifa_name, numa_node))