|
@@ -217,7 +217,7 @@ static int nfs_dns_parse(struct cache_detail *cd, char *buf, int buflen)
|
|
|
{
|
|
|
char buf1[NFS_DNS_HOSTNAME_MAXLEN+1];
|
|
|
struct nfs_dns_ent key, *item;
|
|
|
- unsigned long ttl;
|
|
|
+ unsigned int ttl;
|
|
|
ssize_t len;
|
|
|
int ret = -EINVAL;
|
|
|
|
|
@@ -240,7 +240,8 @@ static int nfs_dns_parse(struct cache_detail *cd, char *buf, int buflen)
|
|
|
key.namelen = len;
|
|
|
memset(&key.h, 0, sizeof(key.h));
|
|
|
|
|
|
- ttl = get_expiry(&buf);
|
|
|
+ if (get_uint(&buf, &ttl) < 0)
|
|
|
+ goto out;
|
|
|
if (ttl == 0)
|
|
|
goto out;
|
|
|
key.h.expiry_time = ttl + seconds_since_boot();
|