Check for errors from inet_addr() with INADDR_NONE
This commit is contained in:
@@ -696,7 +696,7 @@ send_spa_packet(fko_ctx_t ctx, fko_cli_options_t *options)
|
||||
} else
|
||||
saddr.sin_addr.s_addr = INADDR_ANY; /* default */
|
||||
|
||||
if (saddr.sin_addr.s_addr == -1)
|
||||
if (saddr.sin_addr.s_addr == INADDR_NONE)
|
||||
{
|
||||
log_msg(LOG_VERBOSITY_ERROR, "Could not set source IP.");
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user