Fix bug #70 - crash if client is in nat_ip zone, but does not provide an IP in the INF message.

This commit is contained in:
Jan Vidar Krey 2009-08-04 01:02:49 +02:00
parent b9adaa4f8b
commit 9f784e808e

View File

@ -192,7 +192,7 @@ int check_network(struct hub_info* hub, struct hub_user* user, struct adc_messag
if (acl_is_ip_nat_override(hub->acl, address))
{
char* client_given_ip = adc_msg_get_named_argument(cmd, ADC_INF_FLAG_IPV4_ADDR);
if (strcmp(client_given_ip, "0.0.0.0") != 0)
if (client_given_ip && strcmp(client_given_ip, "0.0.0.0") != 0)
{
user_set_nat_override(user);
adc_msg_remove_named_argument(cmd, ADC_INF_FLAG_IPV6_ADDR);