All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org, Marc Eshel <eshel@us.ibm.com>
Subject: Re: [PATCH] sm-notify: "-v hostname" doesn't work when IPV6_SUPPORT is enabled
Date: Mon, 22 Apr 2013 13:19:03 -0400	[thread overview]
Message-ID: <51757107.4030600@RedHat.com> (raw)
In-Reply-To: <20130413161628.29954.19723.stgit@seurat.1015granger.net>



On 13/04/13 12:17, Chuck Lever wrote:
> Marc Eshel reports that using the -v command line option on the
> sm-notify command stopped working after nfs-utils 1.2.2, when IPv6
> support was added.  If nfs-utils is built without IPv6 support, it
> still works.  Marc specified a hostname with a single A record.
> 
> smn_bind_address() must construct a bind address with the same
> family as the RPC socket's protocol family.  Add an AI_V4MAPPED hint
> so an appropriate IPv6 bind address is constructed even if -v
> specifies an IPv4 presentation address, or a hostname with only IPv4
> mappings.
> 
> We still use an IPv4 bind address if IPv6 support is compiled out or
> the host does not support IPv6.
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> Cc: Marc Eshel <eshel@us.ibm.com>
Committed....

steved.

> ---
> 
>  utils/statd/sm-notify.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c
> index a3290aa..9dbe5d9 100644
> --- a/utils/statd/sm-notify.c
> +++ b/utils/statd/sm-notify.c
> @@ -349,7 +349,7 @@ smn_bind_address(const char *srcaddr, const char *srcport)
>  {
>  	struct addrinfo *ai = NULL;
>  	struct addrinfo hint = {
> -		.ai_flags	= AI_NUMERICSERV,
> +		.ai_flags	= AI_NUMERICSERV | AI_V4MAPPED,
>  		.ai_family	= nsm_family,
>  		.ai_protocol	= (int)IPPROTO_UDP,
>  	};
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2013-04-22 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13 16:17 [PATCH] sm-notify: "-v hostname" doesn't work when IPV6_SUPPORT is enabled Chuck Lever
2013-04-22 17:19 ` Steve Dickson [this message]

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=51757107.4030600@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=eshel@us.ibm.com \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.