aboutsummaryrefslogtreecommitdiffstats
path: root/util/network
diff options
context:
space:
mode:
authordesertfury <desertfury@yandex-team.ru>2022-02-10 16:50:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:15 +0300
commitc0fb261e6889e12b418ebcdfdb3c990a4b39fd75 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/network
parentba92f2f3d8a0cfa549b668980b868cbb6ff080ce (diff)
downloadydb-c0fb261e6889e12b418ebcdfdb3c990a4b39fd75.tar.gz
Restoring authorship annotation for <desertfury@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/network')
-rw-r--r--util/network/address.cpp2
-rw-r--r--util/network/address_ut.cpp16
2 files changed, 9 insertions, 9 deletions
diff --git a/util/network/address.cpp b/util/network/address.cpp
index 0c1bfbe3e6..a81a9e6994 100644
--- a/util/network/address.cpp
+++ b/util/network/address.cpp
@@ -160,7 +160,7 @@ static const in6_addr& In6Addr(const IRemoteAddr& addr) {
bool NAddr::IsLoopback(const IRemoteAddr& addr) {
if (addr.Addr()->sa_family == AF_INET) {
- return ((ntohl(InAddr(addr).s_addr) >> 24) & 0xff) == 127;
+ return ((ntohl(InAddr(addr).s_addr) >> 24) & 0xff) == 127;
}
if (addr.Addr()->sa_family == AF_INET6) {
diff --git a/util/network/address_ut.cpp b/util/network/address_ut.cpp
index 2f37fbee9d..28f45172ff 100644
--- a/util/network/address_ut.cpp
+++ b/util/network/address_ut.cpp
@@ -28,12 +28,12 @@ Y_UNIT_TEST_SUITE(IRemoteAddr_ToString) {
TString toString = ToString((const IRemoteAddr&)TAddrInfo(&*it));
UNIT_ASSERT_VALUES_EQUAL(TString("[::1]:22"), toString);
}
-
- Y_UNIT_TEST(Loopback) {
- TNetworkAddress localAddress("127.70.0.1", 22);
- UNIT_ASSERT_VALUES_EQUAL(NAddr::IsLoopback(TAddrInfo(&*localAddress.Begin())), true);
-
- TNetworkAddress localAddress2("127.0.0.1", 22);
- UNIT_ASSERT_VALUES_EQUAL(NAddr::IsLoopback(TAddrInfo(&*localAddress2.Begin())), true);
- }
+
+ Y_UNIT_TEST(Loopback) {
+ TNetworkAddress localAddress("127.70.0.1", 22);
+ UNIT_ASSERT_VALUES_EQUAL(NAddr::IsLoopback(TAddrInfo(&*localAddress.Begin())), true);
+
+ TNetworkAddress localAddress2("127.0.0.1", 22);
+ UNIT_ASSERT_VALUES_EQUAL(NAddr::IsLoopback(TAddrInfo(&*localAddress2.Begin())), true);
+ }
}