projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb93ac3
)
fix inet_aton to accept the generic "numbers-and-dots" IPv4 address format
author
Szabolcs Nagy
<nsz@port70.net>
Tue, 22 Oct 2013 12:23:17 +0000
(12:23 +0000)
committer
Szabolcs Nagy
<nsz@port70.net>
Tue, 22 Oct 2013 12:23:17 +0000
(12:23 +0000)
src/network/inet_legacy.c
patch
|
blob
|
history
diff --git
a/src/network/inet_legacy.c
b/src/network/inet_legacy.c
index 9907c541154ff758a187a519c1b30ee4345dc43a..dd75420e12d7598dec08c81ea86e0a56de7721ed 100644
(file)
--- a/
src/network/inet_legacy.c
+++ b/
src/network/inet_legacy.c
@@
-10,7
+10,10
@@
in_addr_t inet_network(const char *p)
int inet_aton(const char *cp, struct in_addr *inp)
{
- return inet_pton(AF_INET, cp, (void *)inp) > 0;
+ struct sockaddr_in sin;
+ int r = __ipparse(&sin, AF_INET, cp);
+ *inp = sin.sin_addr;
+ return r;
}
struct in_addr inet_makeaddr(int net, int host)