rust-pcap / pcap

Rust language pcap library
Apache License 2.0
617 stars 142 forks source link

Fix IPv4 initialization for test_address_ipv4 #348

Closed musicinmybrain closed 5 months ago

musicinmybrain commented 5 months ago

The address used in the test was incorrectly initialized on big-endian hosts.

Fixes #347.

I tested this as a patch using real s390x hardware.

Stargateur commented 5 months ago

In perfect world I would prefer a better API, probably set_addr should do the to_be() but it's only for testing soooooo.

Wojtek242 commented 5 months ago

Thanks for the PR! The CI doesn't pass, but the failures are the same as on main (I just haven't gotten around to resolving them). I'll handle it and merge soon.

musicinmybrain commented 5 months ago

You’re welcome! Thanks for reviewing it.