From: Andrew Deason Date: Thu, 8 Jul 2010 16:25:19 +0000 (-0500) Subject: viced: Ignore client loopback alternate addresses X-Git-Tag: upstream/1.6.3^2~31 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1e8f1c7727d77e469ed83d51f314e6e66e4ea518;p=packages%2Fo%2Fopenafs.git viced: Ignore client loopback alternate addresses When we receive interface information from a client to determine its alternate IP addresses, ignore any addresses that look like loopback. Reviewed-on: http://gerrit.openafs.org/2368 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: Jeffrey Altman (cherry picked from commit 2a6ddae62e4fac5eecdf4634746e7294405393d6) Change-Id: Idcdaabd3aad62f0e84efbaf1d8523338bc683924 Reviewed-on: http://gerrit.openafs.org/9466 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot --- diff --git a/src/viced/host.c b/src/viced/host.c index 64a766b8c..58106338a 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -4121,7 +4121,7 @@ initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf) /* * Convert IP addresses to network byte order, and remove - * duplicate IP addresses from the interface list, and + * duplicate and loopback IP addresses from the interface list, and * determine whether or not the incoming addr/port is * listed. Note that if the address matches it is not * truly a match because the port number for the entries @@ -4129,6 +4129,9 @@ initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf) * for this connection might not be 7001. */ for (i = 0, count = 0, found = 0; i < number; i++) { + if (rx_IsLoopbackAddr(interf->addr_in[i])) { + continue; + } interf->addr_in[i] = htonl(interf->addr_in[i]); for (j = 0; j < count; j++) { if (interf->addr_in[j] == interf->addr_in[i])