Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153220866
D21406.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
668 B
Referenced Files
None
Subscribers
None
D21406.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 9:38 PM (1 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31866438
Default Alt Text
D21406.diff (668 B)
Attached To
Mode
D21406: ping: use CMSG_FIRSTHDR() for accessing ancillary data
Attached
Detach File
Event Timeline
Log In to Comment