luci-lib-ip: fix creating address instances from integers
authorJo-Philipp Wich <jo@mein.io>
Tue, 7 Nov 2023 21:59:08 +0000 (22:59 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 7 Nov 2023 22:01:50 +0000 (23:01 +0100)
commit704a335c5fd89be291bdb08b59c078c06bb73595
tree0017e5f56bf2dad8e93784fa670ca141b610ca3b
parent90f87beedd18df16838c5991c2fd24bfc806ad56
luci-lib-ip: fix creating address instances from integers

Ensure that the proper byte order is used when creating IPv4/IPv6/MAC
instances from integer values on big endian systems.

Fixes: #6678
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ac7b37ef0133ab8349c8516d5a63a57a44dddafd)
libs/luci-lib-ip/src/ip.c