From: Alan T. DeKok Date: Tue, 10 May 2011 15:02:38 +0000 (+0200) Subject: Tighten checks on ping for TCP sockets X-Git-Tag: release_3_0_0_beta0~861 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da968f38955c6f3de97921550bc22de4225dd0a8;p=thirdparty%2Ffreeradius-server.git Tighten checks on ping for TCP sockets --- diff --git a/src/main/realms.c b/src/main/realms.c index 14cd18ce696..939956d1025 100644 --- a/src/main/realms.c +++ b/src/main/realms.c @@ -617,6 +617,12 @@ static int home_server_add(realm_config_t *rc, CONF_SECTION *cs) hs_proto = NULL; home->proto = IPPROTO_TCP; + if (home->ping_check == HOME_PING_CHECK_REQUEST) { + cf_log_err(cf_sectiontoitem(cs), + "Cannot use 'status_check = request' for home servers where 'proto = tcp'"); + goto error; + } + } else { cf_log_err(cf_sectiontoitem(cs), "Unknown proto \"%s\".", hs_proto); @@ -657,6 +663,7 @@ static int home_server_add(realm_config_t *rc, CONF_SECTION *cs) * Source isn't specified: Source is * the correct address family, but all zeros. */ + memset(&home->src_ipaddr, 0, sizeof(home->src_ipaddr)); home->src_ipaddr.af = home->ipaddr.af; }