提交 451c2b5c 编写于 作者: A Aya Mahfouz 提交者: David S. Miller

net: dns_resolver: convert time_t to time64_t

Changes the definition of the pointer _expiry from time_t to
time64_t. This is to handle the Y2038 problem where time_t
will overflow in the year 2038. The change is safe because
the kernel subsystems that call dns_query pass NULL.
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 206b4950
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
extern int dns_query(const char *type, const char *name, size_t namelen, extern int dns_query(const char *type, const char *name, size_t namelen,
const char *options, char **_result, time_t *_expiry); const char *options, char **_result, time64_t *_expiry);
#endif /* KERNEL */ #endif /* KERNEL */
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
* Returns the size of the result on success, -ve error code otherwise. * Returns the size of the result on success, -ve error code otherwise.
*/ */
int dns_query(const char *type, const char *name, size_t namelen, int dns_query(const char *type, const char *name, size_t namelen,
const char *options, char **_result, time_t *_expiry) const char *options, char **_result, time64_t *_expiry)
{ {
struct key *rkey; struct key *rkey;
const struct user_key_payload *upayload; const struct user_key_payload *upayload;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册