diff mbox

[nfs-utils] exportfs: replace one xlog(D_GENERAL) in host_canonname()

Message ID 1461936366-26852-1-git-send-email-smayhew@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Scott Mayhew April 29, 2016, 1:26 p.m. UTC
If we fall back to using the numeric host then we shouldn't call
xlog with D_GENERAL.  That can cause 'exportfs -u' to exit with a 1
if, for example, you have exports using ip addresses that can't be
resolved to hostnames.  Use D_PARSE instead.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 support/export/hostname.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve Dickson May 2, 2016, 3:58 p.m. UTC | #1
On 04/29/2016 09:26 AM, Scott Mayhew wrote:
> If we fall back to using the numeric host then we shouldn't call
> xlog with D_GENERAL.  That can cause 'exportfs -u' to exit with a 1
> if, for example, you have exports using ip addresses that can't be
> resolved to hostnames.  Use D_PARSE instead.
> 
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Committed... 

steved.

> ---
>  support/export/hostname.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/export/hostname.c b/support/export/hostname.c
> index 94e98a5..5c4c824 100644
> --- a/support/export/hostname.c
> +++ b/support/export/hostname.c
> @@ -230,7 +230,7 @@ host_canonname(const struct sockaddr *sap)
>  	default:
>  		(void)getnameinfo(sap, salen, buf, (socklen_t)sizeof(buf),
>  							NULL, 0, NI_NUMERICHOST);
> -		xlog(D_GENERAL, "%s: failed to resolve %s: %s",
> +		xlog(D_PARSE, "%s: failed to resolve %s: %s",
>  				__func__, buf, gai_strerror(error));
>  		return NULL;
>  	}
> -- 2.4.11
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/support/export/hostname.c b/support/export/hostname.c
index 94e98a5..5c4c824 100644
--- a/support/export/hostname.c
+++ b/support/export/hostname.c
@@ -230,7 +230,7 @@  host_canonname(const struct sockaddr *sap)
 	default:
 		(void)getnameinfo(sap, salen, buf, (socklen_t)sizeof(buf),
 							NULL, 0, NI_NUMERICHOST);
-		xlog(D_GENERAL, "%s: failed to resolve %s: %s",
+		xlog(D_PARSE, "%s: failed to resolve %s: %s",
 				__func__, buf, gai_strerror(error));
 		return NULL;
 	}