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