LINUX: Ignore 'offender' in error queue processing

The 'offender' is who generated the error, possibly who sent us an
icmp packet (the given 'port' will be 0). What we want is the peer
that is actually unavailable, which is already in the 'addr' variable
we received from the recvmsg itself.

Change-Id: I930293ca14f0e13ba09ee94b5a5d9cdc0f321743
Reviewed-on: http://gerrit.openafs.org/8119
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
This commit is contained in:
Andrew Deason 2012-09-11 13:59:21 -05:00 committed by Derrick Brashear
parent 083ec556af
commit 4532e96bb9

View File

@ -105,7 +105,6 @@ osi_HandleSocketError(osi_socket so, char *cmsgbuf, size_t cmsgbuf_len)
struct cmsghdr *cmsg;
struct sock_extended_err *err;
struct sockaddr_in addr;
struct sockaddr *offender;
int code;
struct socket *sop = (struct socket *)so;
@ -134,13 +133,6 @@ osi_HandleSocketError(osi_socket so, char *cmsgbuf, size_t cmsgbuf_len)
}
err = CMSG_DATA(cmsg);
offender = SO_EE_OFFENDER(err);
if (offender->sa_family != AF_INET) {
continue;
}
memcpy(&addr, offender, sizeof(addr));
rxi_ProcessNetError(err, addr.sin_addr.s_addr, addr.sin_port);
}