From: Steve Dickson <SteveD@redhat.com>
To: Neil Brown <neilb@suse.de>
Cc: Chuck Lever <chuck.lever@oracle.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/3] Allow check_fqdn to compare IPv6 addresses
Date: Mon, 27 Sep 2010 07:46:23 -0400 [thread overview]
Message-ID: <4CA0840F.7000106@RedHat.com> (raw)
In-Reply-To: <20100804064945.16641.74397.stgit@localhost.localdomain>
On 08/04/2010 02:49 AM, Neil Brown wrote:
> Simply use nfs_compare_sockaddr in place of addrs_match
>
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
> support/export/client.c | 23 +----------------------
> 1 files changed, 1 insertions(+), 22 deletions(-)
>
> diff --git a/support/export/client.c b/support/export/client.c
> index dc01067..286dcd6 100644
> --- a/support/export/client.c
> +++ b/support/export/client.c
> @@ -372,27 +372,6 @@ add_name(char *old, const char *add)
> return new;
> }
>
> -static _Bool
> -addrs_match4(const struct sockaddr *sa1, const struct sockaddr *sa2)
> -{
> - const struct sockaddr_in *si1 = (const struct sockaddr_in *)sa1;
> - const struct sockaddr_in *si2 = (const struct sockaddr_in *)sa2;
> -
> - return si1->sin_addr.s_addr == si2->sin_addr.s_addr;
> -}
> -
> -static _Bool
> -addrs_match(const struct sockaddr *sa1, const struct sockaddr *sa2)
> -{
> - if (sa1->sa_family == sa2->sa_family)
> - switch (sa1->sa_family) {
> - case AF_INET:
> - return addrs_match4(sa1, sa2);
> - }
> -
> - return false;
> -}
> -
> /*
> * Check each address listed in @ai against each address
> * stored in @clp. Return 1 if a match is found, otherwise
> @@ -405,7 +384,7 @@ check_fqdn(const nfs_client *clp, const struct addrinfo *ai)
>
> for (; ai; ai = ai->ai_next)
> for (i = 0; i < clp->m_naddr; i++)
> - if (addrs_match(ai->ai_addr, get_addrlist(clp, i)))
> + if (nfs_compare_sockaddr(ai->ai_addr, get_addrlist(clp, i)))
> return 1;
>
> return 0;
>
>
This change already exists due to commit 60abb9
steved.
next prev parent reply other threads:[~2010-09-27 11:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 6:49 [PATCH 0/3] Some IPv6 enhancements for nfs-utils Neil Brown
2010-08-04 6:49 ` [PATCH 1/3] Make buffers large enough for IPv6 addresses Neil Brown
2010-09-27 11:33 ` Steve Dickson
2010-08-04 6:49 ` [PATCH 2/3] Give hostname.c more support for IPv6 Neil Brown
2010-08-04 11:57 ` Jim Rees
2010-09-27 11:44 ` Steve Dickson
2010-08-04 6:49 ` [PATCH 3/3] Allow check_fqdn to compare IPv6 addresses Neil Brown
2010-09-27 11:46 ` Steve Dickson [this message]
2010-08-04 15:08 ` [PATCH 0/3] Some IPv6 enhancements for nfs-utils Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CA0840F.7000106@RedHat.com \
--to=steved@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).