handle_inner_ip4_packet(net_state, remote_addr,
ICMP_ECHOREPLY, inner_ip, inner_size,
timestamp, mpls_count, mpls);
+ } else {
+ /*
+ ICMP_DEST_UNREACH subtypes other than port unreachable
+ indicate an exceptional condition, and will be reported
+ as a "no route to host" probe response.
+ */
+ handle_inner_ip4_packet(net_state, remote_addr,
+ ICMP_DEST_UNREACH, inner_ip, inner_size,
+ timestamp, mpls_count, mpls);
}
}
}
handle_inner_ip6_packet(net_state, remote_addr,
ICMP_ECHOREPLY, inner_ip, inner_size,
timestamp, mpls_count, mpls);
+ } else {
+ handle_inner_ip6_packet(net_state, remote_addr,
+ ICMP_DEST_UNREACH, inner_ip, inner_size,
+ timestamp, mpls_count, mpls);
}
}
}
if (icmp_type == ICMP_TIME_EXCEEDED) {
result = "ttl-expired";
+ } else if (icmp_type == ICMP_DEST_UNREACH) {
+ result = "no-route";
} else {
assert(icmp_type == ICMP_ECHOREPLY);
result = "reply";
/* It could be that we got no reply because of timeout */
if (err == IP_REQ_TIMED_OUT || err == IP_SOURCE_QUENCH) {
printf("%d no-reply\n", command_token);
- } else if (err == IP_DEST_HOST_UNREACHABLE
- || err == IP_DEST_PORT_UNREACHABLE
- || err == IP_DEST_PROT_UNREACHABLE
- || err == IP_DEST_NET_UNREACHABLE
- || err == IP_DEST_UNREACHABLE
- || err == IP_DEST_NO_ROUTE
- || err == IP_BAD_ROUTE || err == IP_BAD_DESTINATION) {
- printf("%d no-route\n", command_token);
} else if (err == ERROR_INVALID_NETNAME) {
printf("%d address-not-available\n", command_token);
} else if (err == ERROR_INVALID_PARAMETER) {
icmp_type = ICMP_ECHOREPLY;
} else if (reply_status == IP_TTL_EXPIRED_TRANSIT
|| reply_status == IP_TTL_EXPIRED_REASSEM) {
+
icmp_type = ICMP_TIME_EXCEEDED;
+ } else if (reply_status == IP_DEST_HOST_UNREACHABLE
+ || reply_status == IP_DEST_PORT_UNREACHABLE
+ || reply_status == IP_DEST_PROT_UNREACHABLE
+ || reply_status == IP_DEST_NET_UNREACHABLE
+ || reply_status == IP_DEST_UNREACHABLE
+ || reply_status == IP_DEST_NO_ROUTE
+ || reply_status == IP_BAD_ROUTE
+ || reply_status == IP_BAD_DESTINATION) {
+
+ icmp_type = ICMP_DEST_UNREACH;
}
if (icmp_type != -1) {