mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
3412. [bug] Copy timeval structure from control message data.
[RT #31548]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
3412. [bug] Copy timeval structure from control message data.
|
||||||
|
[RT #31548]
|
||||||
|
|
||||||
3411. [tuning] Use IPV6_USE_MIN_MTU or equivalent with TCP in addition
|
3411. [tuning] Use IPV6_USE_MIN_MTU or equivalent with TCP in addition
|
||||||
to UDP. [RT #31690]
|
to UDP. [RT #31690]
|
||||||
|
|
||||||
|
@@ -1223,7 +1223,7 @@ process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
|
|||||||
struct in6_pktinfo *pktinfop;
|
struct in6_pktinfo *pktinfop;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SO_TIMESTAMP
|
#ifdef SO_TIMESTAMP
|
||||||
struct timeval *timevalp;
|
void *timevalp;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1290,9 +1290,11 @@ process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
|
|||||||
#ifdef SO_TIMESTAMP
|
#ifdef SO_TIMESTAMP
|
||||||
if (cmsgp->cmsg_level == SOL_SOCKET
|
if (cmsgp->cmsg_level == SOL_SOCKET
|
||||||
&& cmsgp->cmsg_type == SCM_TIMESTAMP) {
|
&& cmsgp->cmsg_type == SCM_TIMESTAMP) {
|
||||||
timevalp = (struct timeval *)CMSG_DATA(cmsgp);
|
struct timeval tv;
|
||||||
dev->timestamp.seconds = timevalp->tv_sec;
|
timevalp = CMSG_DATA(cmsgp);
|
||||||
dev->timestamp.nanoseconds = timevalp->tv_usec * 1000;
|
memcpy(&tv, timevalp, sizeof(tv));
|
||||||
|
dev->timestamp.seconds = tv.tv_sec;
|
||||||
|
dev->timestamp.nanoseconds = tv.tv_usec * 1000;
|
||||||
dev->attributes |= ISC_SOCKEVENTATTR_TIMESTAMP;
|
dev->attributes |= ISC_SOCKEVENTATTR_TIMESTAMP;
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user