Fix backwards IPv4 addresses

This commit is contained in:
Lucy 2022-02-08 14:10:28 -05:00
parent 8bdccc1f18
commit a81830cd20
No known key found for this signature in database
GPG key ID: EBC517FAD666BBF1

View file

@ -11,7 +11,13 @@ impl<'a> Ipv4Config<'a> {
let addresses = self.0.addresses().await?;
Ok(addresses
.into_iter()
.map(|addresses| addresses.into_iter().map(Ipv4Addr::from).collect())
.map(|addresses| {
addresses
.into_iter()
.map(|addr| addr.swap_bytes())
.map(Ipv4Addr::from)
.collect()
})
.collect())
}
}