Skip to content

Commit ddc7a0d

Browse files
authored
Fix to turn address into host byte order
1 parent cae5be9 commit ddc7a0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

daemon/interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// interface.cpp
33
//
4-
// Copyright (c) 2019 2020 Andrea Bondavalli. All rights reserved.
4+
// Copyright (c) 2019 2025 Andrea Bondavalli. All rights reserved.
55
//
66
// This program is free software: you can redistribute it and/or modify
77
// it under the terms of the GNU General Public License as published by
@@ -88,7 +88,7 @@ std::tuple<uint32_t, std::string, bool> get_new_interface_ip(
8888
{
8989
uint32_t ip_addr;
9090
inet_pton(AF_INET, curr_addr.c_str(), &ip_addr);
91-
return { ip_addr, curr_addr, false };
91+
return { ntohl(ip_addr), curr_addr, false };
9292
}
9393

9494
auto [ip_addr, ip_str] = get_interface_ip(interface_name);

0 commit comments

Comments
 (0)