From: Linus Nordberg Date: Tue, 10 Apr 2012 14:03:44 +0000 (+0200) Subject: Assert that the conf has at least one host in addserverextraudp(). X-Git-Tag: radsecproxy-1.6-rc0~14 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=radsecproxy.git;a=commitdiff_plain;h=872de3db9cd97001b372561d46bad4293421cf73 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. --- diff --git a/udp.c b/udp.c index 2724a1d..7614f2e 100644 --- a/udp.c +++ b/udp.c @@ -24,6 +24,7 @@ #include #include #include +#include #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) {