Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 2,625 Lines • ▼ Show 20 Lines | for (const auto &addrBind : binds) { | ||||
NetPermissionFlags::PF_NONE); | NetPermissionFlags::PF_NONE); | ||||
} | } | ||||
for (const auto &addrBind : whiteBinds) { | for (const auto &addrBind : whiteBinds) { | ||||
fBound |= Bind(addrBind.m_service, (BF_EXPLICIT | BF_REPORT_ERROR), | fBound |= Bind(addrBind.m_service, (BF_EXPLICIT | BF_REPORT_ERROR), | ||||
addrBind.m_flags); | addrBind.m_flags); | ||||
} | } | ||||
if (binds.empty() && whiteBinds.empty()) { | if (binds.empty() && whiteBinds.empty()) { | ||||
struct in_addr inaddr_any; | struct in_addr inaddr_any; | ||||
inaddr_any.s_addr = INADDR_ANY; | inaddr_any.s_addr = htonl(INADDR_ANY); | ||||
struct in6_addr inaddr6_any = IN6ADDR_ANY_INIT; | struct in6_addr inaddr6_any = IN6ADDR_ANY_INIT; | ||||
fBound |= Bind(CService(inaddr6_any, GetListenPort()), BF_NONE, | fBound |= Bind(CService(inaddr6_any, GetListenPort()), BF_NONE, | ||||
NetPermissionFlags::PF_NONE); | NetPermissionFlags::PF_NONE); | ||||
fBound |= Bind(CService(inaddr_any, GetListenPort()), | fBound |= Bind(CService(inaddr_any, GetListenPort()), | ||||
!fBound ? BF_REPORT_ERROR : BF_NONE, | !fBound ? BF_REPORT_ERROR : BF_NONE, | ||||
NetPermissionFlags::PF_NONE); | NetPermissionFlags::PF_NONE); | ||||
} | } | ||||
return fBound; | return fBound; | ||||
▲ Show 20 Lines • Show All 730 Lines • Show Last 20 Lines |