mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.91k stars 375 forks source link

Tins::Utils::resolve_hwaddr throws intermittent errors #364

Open theDogOfPavlov opened 5 years ago

theDogOfPavlov commented 5 years ago

What do I see?

Tins::Utils::resolve_hwaddr throws intermittent errors, I think when the gateway does not respond immediately to a request.

What do I expect to see?

I currently mitigate this issue by just wrapping the call in a catch/retry construct, but it would be nice to embed this further up the supply chain in the library itself. Maybe some form of reasonable timeout/retry combination.

Example code

destinationIpv4HardwareAddress_ = Tins::Utils::resolve_hwaddr( interface, gatewayIpv4Address, sender_ ).to_string( );

Environment

Ubuntu bionic pcap from packages libtins built from latest source gzip