mirror of
https://github.com/openNDS/openNDS.git
synced 2026-01-09 11:57:55 -05:00
Fix - workaround for Android refusing to resolve local fqdn status.client
Signed-off-by: Rob White <rob@blue-wave.net>
This commit is contained in:
@@ -787,7 +787,7 @@ static int authenticated(struct MHD_Connection *connection,
|
||||
originurl_raw = safe_calloc(SMALL_BUF);
|
||||
captive_json = safe_calloc(SMALL_BUF);
|
||||
|
||||
if (strcmp(config->gw_fqdn, "disable") == 0 || strcmp(config->gw_fqdn, "disabled") == 0) {
|
||||
if (strcmp(config->gw_fqdn, "disable") == 0 || strcmp(config->gw_fqdn, "disabled") == 0 || strcmp(config->gw_fqdn, "status.client") == 0) {
|
||||
safe_snprintf(originurl_raw, SMALL_BUF, "http://%s", config->gw_ip);
|
||||
} else {
|
||||
safe_snprintf(originurl_raw, SMALL_BUF, "http://%s", config->gw_fqdn);
|
||||
@@ -1169,7 +1169,7 @@ static int preauthenticated(struct MHD_Connection *connection, const char *url,
|
||||
|
||||
originurl_raw = safe_calloc(REDIRECT_URL);
|
||||
|
||||
if (strcmp(config->gw_fqdn, "disable") == 0 || strcmp(config->gw_fqdn, "disabled") == 0) {
|
||||
if (strcmp(config->gw_fqdn, "disable") == 0 || strcmp(config->gw_fqdn, "disabled") == 0 || strcmp(config->gw_fqdn, "status.client") == 0) {
|
||||
safe_snprintf(originurl_raw, REDIRECT_URL, "http://%s", config->gw_ip);
|
||||
} else {
|
||||
safe_snprintf(originurl_raw, REDIRECT_URL, "http://%s", config->gw_fqdn);
|
||||
@@ -1435,7 +1435,7 @@ static char *construct_querystring(struct MHD_Connection *connection, t_client *
|
||||
|
||||
gw_url_raw = safe_calloc(REDIRECT_URL);
|
||||
|
||||
if (strcmp(config->gw_fqdn, "disable") == 0 || strcmp(config->gw_fqdn, "disabled") == 0) {
|
||||
if (strcmp(config->gw_fqdn, "disable") == 0 || strcmp(config->gw_fqdn, "disabled") == 0 || strcmp(config->gw_fqdn, "status.client") == 0) {
|
||||
safe_snprintf(gw_url_raw, REDIRECT_URL, "http://%s", config->gw_ip);
|
||||
} else {
|
||||
safe_snprintf(gw_url_raw, REDIRECT_URL, "http://%s", config->gw_fqdn);
|
||||
|
||||
@@ -465,11 +465,16 @@ setup_from_config(void)
|
||||
free(msg);
|
||||
}
|
||||
|
||||
if (strcmp(config->gw_fqdn, "status.client") == 0) {
|
||||
free(config->gw_fqdn);
|
||||
config->gw_fqdn = safe_strdup(config->gw_ip);
|
||||
}
|
||||
|
||||
if (config->dhcp_default_url_enable == 1) {
|
||||
debug(LOG_DEBUG, "Enabling RFC8910 support");
|
||||
dnscmd = safe_calloc(STATUS_BUF);
|
||||
|
||||
if (strcmp(config->gw_fqdn, "disable") != 0 && strcmp(config->gw_fqdn, "disabled") != 0) {
|
||||
if (strcmp(config->gw_fqdn, "disable") != 0 && strcmp(config->gw_fqdn, "disabled") != 0 && strcmp(config->gw_fqdn, "status.client") != 0) {
|
||||
safe_snprintf(dnscmd, STATUS_BUF, "/usr/lib/opennds/dnsconfig.sh \"cpidconf\" \"%s\"", config->gw_fqdn);
|
||||
} else {
|
||||
safe_snprintf(dnscmd, STATUS_BUF, "/usr/lib/opennds/dnsconfig.sh \"cpidconf\" \"%s\"", config->gw_address);
|
||||
|
||||
Reference in New Issue
Block a user