diff options
author | Denys Vlasenko | 2021-08-15 20:06:52 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-08-15 20:06:52 +0200 |
commit | 2a1ce6b20e787525fa9adae9e68fa08e93374863 (patch) | |
tree | a192d22630955f161dc7040df30e69aef21bbde1 /networking | |
parent | 98cb561b5fd61fe37126fce7d557d5280c762b59 (diff) | |
download | busybox-2a1ce6b20e787525fa9adae9e68fa08e93374863.zip busybox-2a1ce6b20e787525fa9adae9e68fa08e93374863.tar.gz |
traceroute: fix compile error due to FreeBSD compat
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-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 057f859..4bbe1ab 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -713,11 +713,16 @@ packet4_ok(int read_len, int seq) up = (struct udphdr *)((char *)hip + hlen); if (hlen + 12 <= read_len && hip->ip_p == IPPROTO_UDP -// Off: since we do not form the entire IP packet, +#if !defined(__FreeBSD__) +// Disabled source check: since we do not form the entire IP packet, // but defer it to kernel, we can't set source port, // and thus can't check it here in the reply + /* && up->source == ident */ + && up->dest == htons(port + seq) +#else /* && up->uh_sport == ident */ && up->uh_dport == htons(port + seq) +#endif ) { return (type == ICMP_TIMXCEED ? -1 : code + 1); } |