summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-02-16 10:52:06 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-02-16 10:52:06 +0000
commit60ec14c13bea9d86790a3905021ccd20760987b3 (patch)
treea46efefae1fc717b393c93cf4aba7028dbe2c3b0
parent1c5b4d8f3808a9db6d150a0e56f2c3f908d752b1 (diff)
removed UDPServerPort directive
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@61 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c16
-rw-r--r--radsecproxy.h1
2 files changed, 6 insertions, 11 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 3956da0..6734fd2 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1405,7 +1405,8 @@ void *udpserverrd(void *arg) {
printf("udpserverrd: socket/bind failed\n");
exit(1);
}
- printf("udpserverrd: listening for UDP on host %s port %s\n", udp_server_listen->host, udp_server_listen->port);
+ printf("udpserverrd: listening for UDP on %s:%s\n",
+ udp_server_listen->host ? udp_server_listen->host : "*", udp_server_listen->port);
if (pthread_create(&udpserverwrth, NULL, udpserverwr, NULL))
errx("pthread_create failed");
@@ -1528,7 +1529,8 @@ int tlslistener() {
}
listen(s, 0);
- printf("listening for incoming TCP on address %s port %s\n", tcp_server_listen->host, tcp_server_listen->port);
+ printf("listening for incoming TCP on %s:%s\n",
+ tcp_server_listen->host ? tcp_server_listen->host : "*", tcp_server_listen->port);
for (;;) {
snew = accept(s, (struct sockaddr *)&from, &fromlen);
@@ -1813,10 +1815,8 @@ struct peer *server_create(char type) {
free(server->host);
server->host = NULL;
}
- } else if (type == 'T')
- server->port = stringcopy(DEFAULT_TLS_PORT, 0);
- else
- server->port = stringcopy(options.udpserverport ? options.udpserverport : DEFAULT_UDP_PORT, 0);
+ } else
+ server->port = stringcopy(type == 'T' ? DEFAULT_TLS_PORT : DEFAULT_UDP_PORT, 0);
if (!resolvepeer(server, AI_PASSIVE)) {
printf("failed to resolve host %s port %s, exiting\n", server->host, server->port);
exit(1);
@@ -1873,10 +1873,6 @@ void getmainconfig(const char *configfile) {
options.tlscertificatekeypassword = stringcopy(val, 0);
continue;
}
- if (!strcasecmp(opt, "UDPServerPort")) {
- options.udpserverport = stringcopy(val, 0);
- continue;
- }
if (!strcasecmp(opt, "ListenUDP")) {
options.listenudp = stringcopy(val, 0);
continue;
diff --git a/radsecproxy.h b/radsecproxy.h
index e1ffb53..c43b837 100644
--- a/radsecproxy.h
+++ b/radsecproxy.h
@@ -53,7 +53,6 @@ struct options {
char *tlscertificatefile;
char *tlscertificatekeyfile;
char *tlscertificatekeypassword;
- char *udpserverport;
char *listenudp;
char *listentcp;
};