Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177690829
D21406.1795041554.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
668 B
Referenced Files
None
Subscribers
None
D21406.1795041554.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
Wed, Nov 18, 10:39 PM (15 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41834219
Default Alt Text
D21406.1795041554.diff (668 B)
Attached To
Mode
D21406: ping: use CMSG_FIRSTHDR() for accessing ancillary data
Attached
Detach File
Event Timeline