dial: reject dial to * (aka 0.0.0.0)

fixes #15 http://code.swtch.com/plan9port/issues/15

http://codereview.appspot.com/107043
This commit is contained in:
Russ Cox 2009-08-15 02:48:08 -04:00
parent 94349f64d1
commit 6d558e12b0

View file

@ -46,6 +46,11 @@ p9dial(char *addr, char *local, char *dummy2, int *dummy3)
free(buf);
return -1;
}
if(host == 0){
werrstr("invalid dial address 0.0.0.0 (aka *)");
free(buf);
return -1;
}
if(strcmp(net, "tcp") == 0)
proto = SOCK_STREAM;