mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
Skip interfaces where address is not set
(cherry picked from commit 41e5c28030)
This commit is contained in:
parent
285b0525ff
commit
7fcdae34e1
@ -152,7 +152,8 @@ void FileClient::bindToNewInterfaces()
|
||||
!(ifap->ifa_flags & IFF_LOOPBACK)
|
||||
&& !(ifap->ifa_flags & IFF_POINTOPOINT))
|
||||
{
|
||||
if (ifap->ifa_addr->sa_family == AF_INET
|
||||
if (ifap->ifa_addr!=NULL
|
||||
&& ifap->ifa_addr->sa_family == AF_INET
|
||||
&& (ifap->ifa_flags & IFF_BROADCAST))
|
||||
{
|
||||
sockaddr_in source_addr;
|
||||
@ -222,7 +223,8 @@ void FileClient::bindToNewInterfaces()
|
||||
|
||||
Server->Log("Broadcasting on ipv4 interface "+std::string(ifap->ifa_name) + " addr " + ipToString(new_udpsock));
|
||||
}
|
||||
else if (ifap->ifa_addr->sa_family == AF_INET6
|
||||
else if (ifap->ifa_addr != NULL
|
||||
&& ifap->ifa_addr->sa_family == AF_INET6
|
||||
&& Server->getServerParameter("disable_ipv6").empty())
|
||||
{
|
||||
sockaddr_in6 source_addr;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user