projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b66ccc9
)
Call new functions to do DNS lookups
author
aland
<aland>
Tue, 19 Apr 2005 23:50:39 +0000
(23:50 +0000)
committer
aland
<aland>
Tue, 19 Apr 2005 23:50:39 +0000
(23:50 +0000)
src/lib/valuepair.c
patch
|
blob
|
history
diff --git
a/src/lib/valuepair.c
b/src/lib/valuepair.c
index
472aebd
..
a5b0f1f
100644
(file)
--- a/
src/lib/valuepair.c
+++ b/
src/lib/valuepair.c
@@
-774,8
+774,17
@@
VALUE_PAIR *pairparsevalue(VALUE_PAIR *vp, const char *value)
p = NULL;
cs = value;
}
- vp->lvalue = librad_dodns ? ip_getaddr(cs) :
- ip_addr(cs);
+
+ {
+ lrad_ipaddr_t ipaddr;
+
+ if (ip_hton(cs, AF_INET, &ipaddr) < 0) {
+ librad_log("Failed to find IP address for %s", cs);
+ return NULL;
+ }
+
+ vp->lvalue = ipaddr.ipaddr.ip4addr.s_addr;
+ }
if (s) free(s);
vp->length = 4;
break;