diff options
| author | Hennadii Stepanov <[email protected]> | 2020-09-22 13:42:47 +0300 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2020-09-29 09:59:43 +0300 |
| commit | b3273cf4039d26e66ae58a8acb9d865461618d54 (patch) | |
| tree | 4b0da60dce8c396a6434bea91ba0ea37eda30dbf /src | |
| parent | Merge #20028: test: Check that invalid peer traffic is accounted for (diff) | |
| download | discoin-b3273cf4039d26e66ae58a8acb9d865461618d54.tar.xz discoin-b3273cf4039d26e66ae58a8acb9d865461618d54.zip | |
net: Use network byte order for in_addr.s_addr
It is documented in the ip(7) manual page.
Diffstat (limited to 'src')
| -rw-r--r-- | src/net.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index 5b533d7d1..856a1b390 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2322,7 +2322,7 @@ bool CConnman::InitBinds(const std::vector<CService>& binds, const std::vector<N } if (binds.empty() && whiteBinds.empty()) { 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; fBound |= Bind(CService(inaddr6_any, GetListenPort()), BF_NONE, NetPermissionFlags::PF_NONE); fBound |= Bind(CService(inaddr_any, GetListenPort()), !fBound ? BF_REPORT_ERROR : BF_NONE, NetPermissionFlags::PF_NONE); |