fixed segfault when sourceip in stroke message is NULL

This commit is contained in:
Martin Willi
2007-08-06 12:35:28 +00:00
parent 7ad634a2ef
commit 3b574567ea
@@ -336,11 +336,11 @@ static void stroke_add_conn(stroke_msg_t *msg, FILE *out)
goto destroy_ids; goto destroy_ids;
} }
if (msg->add_conn.me.virtual_ip) if (msg->add_conn.me.virtual_ip && msg->add_conn.me.sourceip)
{ {
my_vip = host_create_from_string(msg->add_conn.me.sourceip, 0); my_vip = host_create_from_string(msg->add_conn.me.sourceip, 0);
} }
if (msg->add_conn.other.virtual_ip) if (msg->add_conn.other.virtual_ip && msg->add_conn.other.sourceip)
{ {
other_vip = host_create_from_string(msg->add_conn.other.sourceip, 0); other_vip = host_create_from_string(msg->add_conn.other.sourceip, 0);
} }