Allow binding on lo
authorThomas Goirand <zigo@debian.org>
Fri, 15 Jan 2021 11:26:14 +0000 (11:26 +0000)
committerThomas Goirand <zigo@debian.org>
Fri, 15 Jan 2021 11:26:14 +0000 (11:26 +0000)
Forwarded: https://github.com/ceph/ceph/pull/38925
Last-Update: 2021-01-15

Commmit 5cf0fa8, 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".

Gbp-Pq: Name allow-binding-on-lo.patch

src/common/ipaddr.cc

index debf4ba2b2aa672cffe6361784bd161f488ae055..4b416174629b52faecb51e5c0c4ae2ee6089b67b 100644 (file)
@@ -56,7 +56,7 @@ const struct ifaddrs *find_ipv4_in_subnet(const struct ifaddrs *addrs,
     if (addrs->ifa_addr == NULL)
       continue;
 
-    if (strcmp(addrs->ifa_name, "lo") == 0)
+    if (strcmp(addrs->ifa_name, "lo:") == 0)
       continue;
 
     if (numa_node >= 0 && !match_numa_node(addrs->ifa_name, numa_node))