Subject: | setsockopt() fails under 64-bit FreeBSD |
Under (at least) FreeBSD/amd64 7+, the module's call to setsockopt() to set TTL fails with
EINVAL, causing all traces to have only one hop.
In my tests, it can be fixed by commenting the local definition of IP_TTL (Socket.pm has a
different value) and changing the call to setsockopt() from:
setsockopt($session->{socket_handle}, IPPROTO_IP, IP_TTL, pack('C',$hop));
to:
setsockopt($session->{socket_handle}, IPPROTO_IP, IP_TTL, pack('i',$hop));
This probably also effects Net::Traceroute::PurePerl, but I haven't checked.