}
break;
case GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT:
-
if (size < sizeof (struct ConnectInfoMessage))
{
GNUNET_break (0);
GNUNET_break (0);
break;
}
-
+ if (0 == memcmp (&cim->id,
+ &h->self,
+ sizeof (struct GNUNET_PeerIdentity)))
+ {
+ /* connect to self!? */
+ GNUNET_break (0);
+ break;
+ }
#if DEBUG_TRANSPORT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Receiving `%s' message for `%4s'.\n",
}
dim = (const struct DisconnectInfoMessage *) msg;
GNUNET_break (ntohl (dim->reserved) == 0);
+ if (0 == memcmp (&dim->peer,
+ &h->self,
+ sizeof (struct GNUNET_PeerIdentity)))
+ {
+ /* discconnect from self!? */
+ GNUNET_break (0);
+ break;
+ }
#if DEBUG_TRANSPORT_DISCONNECT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Receiving `%s' message for `%4s'.\n",