Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166785619
D21220.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
586 B
Referenced Files
None
Subscribers
None
D21220.id.diff
View Options
Index: sbin/ping6/ping6.c
===================================================================
--- sbin/ping6/ping6.c
+++ sbin/ping6/ping6.c
@@ -1379,8 +1379,12 @@
struct tv32 *tv32;
(void)gettimeofday(&tv, NULL);
tv32 = (struct tv32 *)&outpack[ICMP6ECHOLEN];
- tv32->tv32_sec = htonl(tv.tv_sec);
- tv32->tv32_usec = htonl(tv.tv_usec);
+ /*
+ * The time values saved in a packet are
+ * truncated down to 32 bits.
+ */
+ tv32->tv32_sec = (uint32_t)htonl(tv.tv_sec);
+ tv32->tv32_usec = (uint32_t)htonl(tv.tv_usec);
}
cc = ICMP6ECHOLEN + datalen;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 17, 3:09 PM (18 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36858268
Default Alt Text
D21220.id.diff (586 B)
Attached To
Mode
D21220: ping6: Annotate truncating of time values saved in a packet
Attached
Detach File
Event Timeline
Log In to Comment