1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Fix wrong address endian

Host endian has been implicitly converted to big endian in "IPv4Address::operator uint32_t()"
This commit is contained in:
ceerrep
2021-03-24 18:37:09 +08:00
parent b447c664e1
commit 222611b377
2 changed files with 4 additions and 4 deletions

View File

@@ -320,7 +320,7 @@ public:
* \return Returns the gateway field value.
*/
address_type gateway() const {
return address_type(Endian::be_to_host(header_.un.gateway));
return address_type(header_.un.gateway);
}
/**
@@ -383,7 +383,7 @@ public:
* \return Returns the address mask value.
*/
address_type address_mask() const {
return address_type(Endian::be_to_host(orig_timestamp_or_address_mask_));
return address_type(orig_timestamp_or_address_mask_);
}
/**