ip bytes converts to uint32 incorrect
hzxuzhonghu opened this issue · comments
What happened:
As IP address is stored with big endian, but here we use little endian to restore. https://github.com/kmesh-net/kmesh/blob/main/pkg/nets/nets.go#L56
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
- Kmesh version:
- Others:
IP uses big endian, while the function you mentioned converts the IP to uint32 in little endian.
This seems to be inconsistent with what you described.
In nets.go there is a function to convert uint32 to IP form, using the big endian.