diff mbox

[-,nfs-utils] Stop Treat IP addresses a FQDN rather than SUBNETs.

Message ID 20131022101754.462d3f8b@notabene.brown
State New, archived
Headers show

Commit Message

NeilBrown Oct. 21, 2013, 11:17 p.m. UTC
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>

Comments

Steve Dickson Oct. 24, 2013, 8:07 p.m. UTC | #1
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;
>  }
> 
--
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/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;
 }