projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7575ce8
)
"localhost" is a valid host name
author
Alan T. DeKok
<aland@freeradius.org>
Wed, 18 Nov 2015 16:14:02 +0000
(11:14 -0500)
committer
Alan T. DeKok
<aland@freeradius.org>
Wed, 18 Nov 2015 16:14:02 +0000
(11:14 -0500)
src/lib/misc.c
patch
|
blob
|
history
diff --git
a/src/lib/misc.c
b/src/lib/misc.c
index
91184c9
..
5ef00fe
100644
(file)
--- a/
src/lib/misc.c
+++ b/
src/lib/misc.c
@@
-565,12
+565,13
@@
int fr_pton_port(fr_ipaddr_t *out, uint16_t *port_out, char const *value, ssize_
* Host, IPv4 or IPv6 with no port
*/
q = memchr(p, ':', len);
- if (!q
|| !memchr(p, '.', len)
) return fr_pton(out, p, len, af, resolve);
+ if (!q) return fr_pton(out, p, len, af, resolve);
/*
* IPv4 or host, with port
*/
if (fr_pton(out, p, (q - p), af, resolve) < 0) return -1;
+
do_port:
/*
* Valid ports are a maximum of 5 digits, so if the