viced: Ignore client loopback alternate addresses
authorAndrew Deason <adeason@sinenomine.net>
Thu, 8 Jul 2010 16:25:19 +0000 (11:25 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 1 Mar 2012 01:56:22 +0000 (17:56 -0800)
When we receive interface information from a client to determine its
alternate IP addresses, ignore any addresses that look like loopback.

Change-Id: I245ebfc74ad1e8bd2fcd235a00f000d29229668d
Reviewed-on: http://gerrit.openafs.org/2368
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/viced/host.c

index 86a3377..ef5deef 100644 (file)
@@ -4063,7 +4063,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
@@ -4071,6 +4071,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])