189 |
|
|
190 |
if (EmptyString(name)) |
if (EmptyString(name)) |
191 |
auth_sendheader(auth->client, REPORT_FAIL_DNS); |
auth_sendheader(auth->client, REPORT_FAIL_DNS); |
192 |
|
else if (address_compare(addr, &auth->client->ip, false) == false) |
193 |
|
auth_sendheader(auth->client, REPORT_IP_MISMATCH); |
194 |
|
else if (namelength > HOSTLEN) |
195 |
|
auth_sendheader(auth->client, REPORT_HOST_TOOLONG); |
196 |
|
else if (auth_verify_hostname(name) == false) |
197 |
|
auth_sendheader(auth->client, REPORT_HOST_INVALID); |
198 |
else |
else |
199 |
{ |
{ |
200 |
if (address_compare(addr, &auth->client->ip, false) == false) |
strlcpy(auth->client->host, name, sizeof(auth->client->host)); |
201 |
auth_sendheader(auth->client, REPORT_IP_MISMATCH); |
auth_sendheader(auth->client, REPORT_FIN_DNS); |
|
else if (namelength > HOSTLEN) |
|
|
auth_sendheader(auth->client, REPORT_HOST_TOOLONG); |
|
|
else if (auth_verify_hostname(name) == false) |
|
|
auth_sendheader(auth->client, REPORT_HOST_INVALID); |
|
|
else |
|
|
{ |
|
|
strlcpy(auth->client->host, name, sizeof(auth->client->host)); |
|
|
auth_sendheader(auth->client, REPORT_FIN_DNS); |
|
|
} |
|
202 |
} |
} |
203 |
|
|
204 |
auth_release_client(auth); |
auth_release_client(auth); |