All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH - nfs-utils] Stop Treat IP addresses a FQDN rather than SUBNETs.
@ 2013-10-21 23:17 NeilBrown
  2013-10-24 20:07 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2013-10-21 23:17 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Wangminlan, NFS

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]



I think there was a reason for this many years ago,
but I can not find any evidence that it ever really did
anything useful and it certainly doesn't seem to now.

And the documentation suggests that IP address take precedence over
SUBNETs, and that can only happen if they are treated as MCL_FQDN.

So remove this apparently pointless code.

Reported-and-tested-by: Wangminlan <wangminlan@huawei.com>
Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/support/export/client.c b/support/export/client.c
index ba2db8f..adbeed8 100644
--- a/support/export/client.c
+++ b/support/export/client.c
@@ -767,15 +767,5 @@ client_gettype(char *ident)
 			sp++;
 	}
 
-	/*
-	 * Treat unadorned IP addresses as MCL_SUBNETWORK.
-	 * Everything else is MCL_FQDN.
-	 */
-	ai = host_pton(ident);
-	if (ai != NULL) {
-		freeaddrinfo(ai);
-		return MCL_SUBNETWORK;
-	}
-
 	return MCL_FQDN;
 }

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH - nfs-utils] Stop Treat IP addresses a FQDN rather than SUBNETs.
  2013-10-21 23:17 [PATCH - nfs-utils] Stop Treat IP addresses a FQDN rather than SUBNETs NeilBrown
@ 2013-10-24 20:07 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2013-10-24 20:07 UTC (permalink / raw)
  To: NeilBrown; +Cc: Wangminlan, NFS



On 21/10/13 19:17, NeilBrown wrote:
> 
> 
> I think there was a reason for this many years ago,
> but I can not find any evidence that it ever really did
> anything useful and it certainly doesn't seem to now.
> 
> And the documentation suggests that IP address take precedence over
> SUBNETs, and that can only happen if they are treated as MCL_FQDN.
> 
> So remove this apparently pointless code.
> 
> Reported-and-tested-by: Wangminlan <wangminlan@huawei.com>
> Signed-off-by: NeilBrown <neilb@suse.de>
Committed...

steved.

> 
> diff --git a/support/export/client.c b/support/export/client.c
> index ba2db8f..adbeed8 100644
> --- a/support/export/client.c
> +++ b/support/export/client.c
> @@ -767,15 +767,5 @@ client_gettype(char *ident)
>  			sp++;
>  	}
>  
> -	/*
> -	 * Treat unadorned IP addresses as MCL_SUBNETWORK.
> -	 * Everything else is MCL_FQDN.
> -	 */
> -	ai = host_pton(ident);
> -	if (ai != NULL) {
> -		freeaddrinfo(ai);
> -		return MCL_SUBNETWORK;
> -	}
> -
>  	return MCL_FQDN;
>  }
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-24 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-21 23:17 [PATCH - nfs-utils] Stop Treat IP addresses a FQDN rather than SUBNETs NeilBrown
2013-10-24 20:07 ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.