rx: fix abort on missing service

patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced
the possibility that a NULL connection pointer could be dereferenced.
Prevent it.

Change-Id: Ic813642c8073cedc3e4df578c1b06fecd22cfbdf
Reviewed-on: http://gerrit.openafs.org/7794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
Jeffrey Altman 2012-07-20 10:20:02 -04:00
parent bbf92017b0
commit 3ec1bdf9c7

View File

@ -3246,10 +3246,11 @@ rxi_ReceivePacket(struct rx_packet *np, osi_socket socket,
/* To avoid having 2 connections just abort at each other,
don't abort an abort. */
if (!conn && (np->header.type != RX_PACKET_TYPE_ABORT)) {
rxi_SendRawAbort(socket, host, port, RX_INVALID_OPERATION,
np, 0);
return np;
if (!conn) {
if (np->header.type != RX_PACKET_TYPE_ABORT)
rxi_SendRawAbort(socket, host, port, RX_INVALID_OPERATION,
np, 0);
return np;
}
/* If we're doing statistics, then account for the incoming packet */