1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-29 23:56:38 +02:00

Remove is_ip_valid() as we already have is_valid_ip(), and update

the doxygen docs a bit for that function.
This commit is contained in:
Bram Matthys
2021-09-25 08:16:07 +02:00
parent c582a29f09
commit 847f2fc384
4 changed files with 14 additions and 24 deletions
+1 -1
View File
@@ -349,7 +349,7 @@ void dowebirc(Client *client, const char *ip, const char *host, const char *opti
/* STEP 1: Update client->local->ip
inet_pton() returns 1 on success, 0 on bad input, -1 on bad AF */
if (!is_ip_valid(ip))
if (!is_valid_ip(ip))
{
/* then we have an invalid IP */
exit_client(client, NULL, "Invalid IP address");
+2 -2
View File
@@ -184,7 +184,7 @@ int websocket_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
errors++;
continue;
}
if (!is_ip_valid(cep->value))
if (!is_valid_ip(cep->value))
{
config_error("%s:%i: invalid IP address '%s' in listen::options::websocket::forward", cep->file->filename, cep->line_number, cep->value);
errors++;
@@ -696,7 +696,7 @@ int websocket_handshake_valid(Client *client)
struct HTTPForwardedHeader *forwarded;
forwarded = websocket_parse_forwarded_header(WSU(client)->forwarded);
/* check header values */
if (!is_ip_valid(forwarded->ip))
if (!is_valid_ip(forwarded->ip))
{
unreal_log(ULOG_WARNING, "websocket", "INVALID_FORWARDED_IP", client, "Received invalid IP in Forwarded header from $ip", log_data_string("ip", client->ip));
dead_socket(client, "Forwarded: invalid IP");