summaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2012-04-25 17:41:27 +0200
committerLinus Nordberg <linus@nordu.net>2012-04-25 17:41:27 +0200
commit19b5ce7ac3f838e689ae6e6b1e4a0c114b44ce67 (patch)
tree8b1cf80d30846833111d1e6733a8031408fb2321 /lib/include
parent41ca60fee8c14f74af22bbeeda56574e883c21a9 (diff)
Postpone resolving of DNS names of server.
We used to resolve DNS names when reading configuration. We now do it in event_init_socket() and cache the result in the connection object. The imminent need for changing this is to keep host names around for X509 certificate verification (CNAME and subjectAltName). This will also help later when we implement server failover (and later, when people want to do more dynamic configuration, f.ex. NAPTR).
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/radsec/radsec-impl.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h
index 59cb8bf..752ea71 100644
--- a/lib/include/radsec/radsec-impl.h
+++ b/lib/include/radsec/radsec-impl.h
@@ -50,8 +50,10 @@ struct rs_error {
struct rs_peer {
struct rs_connection *conn;
struct rs_realm *realm;
- struct evutil_addrinfo *addr;
+ char *hostname;
+ char *service;
char *secret; /* RADIUS secret. */
+ struct evutil_addrinfo *addr_cache;
struct rs_peer *next;
};
@@ -127,11 +129,6 @@ struct rs_packet {
struct rs_packet *next; /* Used for UDP output queue. */
};
-/* Nonpublic functions (in radsec.c -- FIXME: move?). */
-struct rs_error *rs_resolv (struct evutil_addrinfo **addr,
- rs_conn_type_t type,
- const char *hostname,
- const char *service);
#if defined (__cplusplus)
}
#endif