Merge pull request #629 from arurke/bug/set-correct-dns-record-expiration
Set correct DNS record expiration time
This commit is contained in:
commit
dedf033668
|
@ -1017,7 +1017,8 @@ newdata(void)
|
|||
|
||||
namemapptr->state = STATE_DONE;
|
||||
#if RESOLV_SUPPORTS_RECORD_EXPIRATION
|
||||
namemapptr->expiration = ans->ttl[1] + (ans->ttl[0] << 8);
|
||||
namemapptr->expiration = (uint32_t) uip_ntohs(ans->ttl[0]) << 16 |
|
||||
(uint32_t) uip_ntohs(ans->ttl[1]);
|
||||
namemapptr->expiration += clock_seconds();
|
||||
#endif /* RESOLV_SUPPORTS_RECORD_EXPIRATION */
|
||||
|
||||
|
|
Loading…
Reference in New Issue