Skip to content

Commit

Permalink
fix ICMP and ICMPv6 destinaton unreachable parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
abraxxa committed Jan 24, 2018
1 parent 5355444 commit dceb980
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Revision history for {{$dist->name}}

{{$NEXT}}
- fix ICMP and ICMPv6 destinaton unreachable parsing

0.004000 2018-01-24 09:09:21+01:00 Europe/Vienna
- add ping vs. raw socket advantages to ICMP and ICMPv6 documentation
Expand Down
2 changes: 1 addition & 1 deletion lib/Net/Async/Ping/ICMP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ sub _parse_icmp_packet {
# 8 byte is the length of the ICMP Destination
# unreachable header
raw => substr($recv_msg, $offset + 8)
);
)->unpack;
# skip if contained packet isn't an icmp packet
return
if $ipv4->protocol != NF_IPv4_PROTOCOL_ICMPv4;
Expand Down
2 changes: 1 addition & 1 deletion lib/Net/Async/Ping/ICMPv6.pm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ sub _parse_icmpv6_packet {
# 8 byte is the length of the ICMPv6 destination
# unreachable header
raw => substr($recv_msg, $offset + 8)
);
)->unpack;
# skip if contained packet isn't an ICMPv6 packet
return
if $ipv6->protocol != NF_IPv6_PROTOCOL_ICMPv6;
Expand Down

0 comments on commit dceb980

Please sign in to comment.