9vx: better handling of numeric internet names - vx32 - Local 9vx git repository for patches.
Log
Files
Refs
---
commit 3dabeec6b12fbb5764779bb4e233b262a6f2689f
parent 8a44751270915a0ad6e86adf68a111dd509be9be
Author: Russ Cox 
Date:   Tue,  8 Jul 2008 13:17:21 -0400

9vx: better handling of numeric internet names

Diffstat:
  src/9vx/devip.c                     |       6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/9vx/devip.c b/src/9vx/devip.c
@@ -806,11 +806,11 @@ static int
 lookuphost(char *s, uchar *to)
 {
         ulong ip;
+        char *p;
 
         memset(to, 0, 4);
-        v4parseip(to, s);
-        ip = nhgetl(to);
-        if(ip != 0)
+        p = v4parseip(to, s);
+        if(p && *p == 0 && (ip = nhgetl(to)) != 0)
                 return 0;
         if((s = hostlookup(s)) == nil)
                 return -1;