diff --git a/CHANGELOG b/CHANGELOG
index bce2ee6..840471b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -11,6 +11,7 @@
 - remove redundant ident macros.
 - various configure cleanups (Richard Daniel).
 - various code cleanups (Richard Daniel).
+- fixed numeric export match.
 
 20/2/2007 autofs-5.0.1
 ----------------------
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
index 2c5b5d5..5151a1e 100644
--- a/lib/rpc_subs.c
+++ b/lib/rpc_subs.c
@@ -1072,18 +1072,23 @@ static char *inet_fill_net(const char *net_num, char *net)
 	if (strlen(net_num) > INET_ADDRSTRLEN)
 		return NULL;
 
+	if (!isdigit(*net_num))
+		return NULL;
+
 	*net = '\0';
 	strcpy(net, net_num);
 
 	np = net;
-	while (*np) {
-		if (*np++ == '.') {
+	while (*np++) {
+		if (*np == '.') {
+			np++;
 			dots--;
 			if (!*np && dots)
 				strcat(net, "0");
+			continue;
 		}
 
-		if (!isdigit(*np) || dots < 0) {
+		if ((*np && !isdigit(*np)) || dots < 0) {
 			*net = '\0';
 			return NULL;
 		}