From 4532e96bb96ab6424c7c00327c094f9b5b307f91 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 11 Sep 2012 13:59:21 -0500 Subject: [PATCH] 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 Reviewed-by: Derrick Brashear --- src/rx/LINUX/rx_knet.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c index 3dfe1de977..81f44006d5 100644 --- a/src/rx/LINUX/rx_knet.c +++ b/src/rx/LINUX/rx_knet.c @@ -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); }