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]: https://github.com/NetBSD/src/commit/203dfd34867991fd002f747d74a96f26ae80d41c [3]: https://github.com/openbsd/src/commit/d83449c83c03b86e72d642dc92bcea434310435a Reviewed by: markj MFC after: 1 week
This commit is contained in:
committed by
Mark Johnston
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;
|
||||
|
||||
Reference in New Issue
Block a user