Guarantee entry->other is set when calling put_connected_peers
authorThomas Egerer <thomas.egerer@secunet.com>
Fri, 3 Dec 2010 08:23:06 +0000 (09:23 +0100)
committerMartin Willi <martin@revosec.ch>
Mon, 6 Dec 2010 09:56:57 +0000 (10:56 +0100)
commit76ce213c4367e95af7220e9baf828b7924bdc17b
tree2a2b6c61a20439ed373ed8f21e0a9834af675ca7
parent2965eb3cc7d56a573aeb1f13d06b8a2e03ed38c8
Guarantee entry->other is set when calling put_connected_peers

Given the original intent of entry->host, the check for DoS attacks, it
can happen that this value remains NULL when an entry is created. This
is particularly awkward if put_connected_peers is called to check if a
connection to a given peer already exists, since it takes the address
family into consideration (git commit b74219d0) which is gleaned from
entry->host.
This patch guarantees that entry->other is a clone of host before
put_connected_peers is called.
src/libcharon/sa/ike_sa_manager.c