Page MenuHomeFreeBSD

D21406.diff
No OneTemporary

D21406.diff

Index: head/sbin/ping/ping.c
===================================================================
--- head/sbin/ping/ping.c
+++ head/sbin/ping/ping.c
@@ -875,6 +875,7 @@
msg.msg_iovlen = 1;
#ifdef SO_TIMESTAMP
msg.msg_control = (caddr_t)ctrl;
+ msg.msg_controllen = sizeof(ctrl);
#endif
iov.iov_base = packet;
iov.iov_len = IP_MAXPACKET;
@@ -920,9 +921,7 @@
if (n == 1) {
struct timespec *tv = NULL;
#ifdef SO_TIMESTAMP
- struct cmsghdr *cmsg = (struct cmsghdr *)&ctrl;
-
- msg.msg_controllen = sizeof(ctrl);
+ struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
#endif
msg.msg_namelen = sizeof(from);
if ((cc = recvmsg(srecv, &msg, 0)) < 0) {

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 10, 12:22 AM (4 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38621887
Default Alt Text
D21406.diff (668 B)

Event Timeline