diff options
author | Linus Nordberg <linus@nordu.net> | 2012-04-10 16:03:44 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2012-04-12 17:26:13 +0200 |
commit | 872de3db9cd97001b372561d46bad4293421cf73 (patch) | |
tree | 823bbbe11286cb70d79ff76fb9701fd6f4c7e8d3 | |
parent | 8b7224cfaf6961c48c018e6cfc500d577c8caaac (diff) |
Assert that the conf has at least one host in addserverextraudp().
Dynamic servers has clearly never been run on UDP servers.
We should probably do something less evil than crashing here.
Closes RADSECPROXY-26.
-rw-r--r-- | udp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -24,6 +24,7 @@ #include <arpa/inet.h> #include <regex.h> #include <pthread.h> +#include <assert.h> #include "radsecproxy.h" #include "hostport.h" @@ -317,6 +318,7 @@ void addclientudp(struct client *client) { } void addserverextraudp(struct clsrvconf *conf) { + assert(list_first(conf->hostports) != NULL); switch (((struct hostportres *)list_first(conf->hostports)->data)->addrinfo->ai_family) { case AF_INET: if (client4_sock < 0) { |