Skip to contentSkip to conversation

Stop Treat IP addresses a FQDN rather than SUBNETs.

PATCH In review NeilBrown 2 participants 2 messages Oct 21, 2013 – Oct 24, 2013

Subsystems (2)
lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 Stop Treat IP addresses a FQDN rather than SUBNETs.

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.

support/export/client.c +0 -10
index ba2db8f..adbeed8 100644
@@ -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;
 }
#1 lore raw
Quoted 6 lines · NeilBrown

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.

Quoted 7 lines

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.

Committed...

steved.

Quoted 22 lines
support/export/client.c +0 -10
index ba2db8f..adbeed8 100644
@@ -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;
 }