diff options
-rw-r--r-- | networking/traceroute.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c index 057f8591a..4bbe1ab8e 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -713,11 +713,16 @@ packet4_ok(int read_len, int seq) | |||
713 | up = (struct udphdr *)((char *)hip + hlen); | 713 | up = (struct udphdr *)((char *)hip + hlen); |
714 | if (hlen + 12 <= read_len | 714 | if (hlen + 12 <= read_len |
715 | && hip->ip_p == IPPROTO_UDP | 715 | && hip->ip_p == IPPROTO_UDP |
716 | // Off: since we do not form the entire IP packet, | 716 | #if !defined(__FreeBSD__) |
717 | // Disabled source check: since we do not form the entire IP packet, | ||
717 | // but defer it to kernel, we can't set source port, | 718 | // but defer it to kernel, we can't set source port, |
718 | // and thus can't check it here in the reply | 719 | // and thus can't check it here in the reply |
720 | /* && up->source == ident */ | ||
721 | && up->dest == htons(port + seq) | ||
722 | #else | ||
719 | /* && up->uh_sport == ident */ | 723 | /* && up->uh_sport == ident */ |
720 | && up->uh_dport == htons(port + seq) | 724 | && up->uh_dport == htons(port + seq) |
725 | #endif | ||
721 | ) { | 726 | ) { |
722 | return (type == ICMP_TIMXCEED ? -1 : code + 1); | 727 | return (type == ICMP_TIMXCEED ? -1 : code + 1); |
723 | } | 728 | } |