Rojin George has uploaded this change for review.

View Change

Handle Expired IP to Name mapping in cache

When a user was trying to mount client
using NFS ganesha wildcard server config from a ubuntu client
and this mount was failing. After debugging it was found,
that the hostname to ip cache [ht_ip_name] was only updated
once and the cache is set to never expire. So if the clientIP
changes with DNS updated for example like in DHCP, then mount
request would fail.

This change avoids this, by validating the timestamp of the cache
entry and marking it to be expired in the get path, if so.
Thereby getting the new entry added to the cache.

Change-Id: I24f30100028e667f38a7eccadb5cc17b2da9d7b0
Signed-off-by: Rojin George <itsmerojin@gmail.com>
---
M src/support/nfs_ip_name.c
1 file changed, 19 insertions(+), 0 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/93/1168193/1

To view, visit change 1168193. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I24f30100028e667f38a7eccadb5cc17b2da9d7b0
Gerrit-Change-Number: 1168193
Gerrit-PatchSet: 1
Gerrit-Owner: Rojin George <itsmerojin@gmail.com>
Gerrit-MessageType: newchange