ping: Remove ifndef icmp_data guards
Early versions of <netinet/ip_icmp.h> [1] did not have icmp_data defined, but FreeBSD has always had. Remove these guards. NetBSD [2] and OpenBSD [3] have already removed them. [1]: https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/netinet/ip_icmp.h [2]:203dfd3486
[3]:d83449c83c
Reviewed by: markj MFC after: 1 week
This commit is contained in:
parent
9185854d19
commit
6d33121337
@ -1189,12 +1189,8 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef icmp_data
|
||||
icmp_data_raw = buf + hlen + offsetof(struct icmp, icmp_ip);
|
||||
#else
|
||||
icmp_data_raw_len = cc - (hlen + offsetof(struct icmp, icmp_data));
|
||||
icmp_data_raw = buf + hlen + offsetof(struct icmp, icmp_data);
|
||||
#endif
|
||||
|
||||
/* Now the ICMP part */
|
||||
cc -= hlen;
|
||||
|
Loading…
Reference in New Issue
Block a user