Closed qinghon closed 1 hour ago
I've swapped it out locally with an ipnet
test and everything seems to be working fine.
Thank you for the suggestion and feedback!
Originally, over two years ago, the IpNet
(Ipv4Net
and Ipv6Net
) implementation was created to minimize dependencies for netdev
, and at that time, I also wanted to keep serde
as an optional feature (which is now optional in ipnet
, so there's no issue anymore). As for the netmask
field, I agree that it is not essential, and using the methods provided by ipnet
would be more appropriate when needed.
Therefore, replacing the ip.rs
implementation with ipnet
(re-export) is not only acceptable but also beneficial for future maintenance. I have already made the replacement and completed testing.
According to my observation, the IpNet implementation in netdev has a high degree of overlap with the
ipnet
create implementation, but the implementation in netdev has anetmask
field that is not real useful. Is thisnetmask
necessary? Can the ip.rs implementation be replaced by ipnet?