Frank Filz has uploaded this change for review.

View Change

Fix up SM_NOTIFY caller_name

When the client is configured to use the IP address as the caller name
instead of host name, we must convert that IP address string to a
sockaddr_t that will be set as op_ctx->caller_addr. In this case,
since we don't have gsh_client (we can't find the existing one because
we don't have the client port), we also set op_cxt->client to NULL.

SM_NOTIFY MUST always come from the loop back interface.

Note that get_nsm_client will ALWAYS use the caller name from the
SM_NOTIFY, the only question is what IP address stuff we set. If
nsm_use_caller_name is false AND op_ctx->client is NULL,
get_nsm_client is being called for SM_NOTIFY and will just use
caller name instead of trying to convert a client IP address to
a string. This actually saves a bunch of work...

NOTE: This effort makes it clear the client and server MUST agree
about get_nsm_client... ALSO the client and server MUST agrees how
an IPv4 address encapsulated into IPv6 is handled (Linux kernel
and now Ganesha with a previous patch just use the IPv4 address
string, not the IPv6 encapsulated string).

Change-Id: I59dae62fb3a06e4b930c47b4725e5e5994f2ea1c
Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
---
M src/Protocols/NLM/nlm_Sm_Notify.c
M src/SAL/nlm_owner.c
2 files changed, 51 insertions(+), 98 deletions(-)

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

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

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I59dae62fb3a06e4b930c47b4725e5e5994f2ea1c
Gerrit-Change-Number: 526274
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx@mindspring.com>
Gerrit-MessageType: newchange