public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: linux-nfs@vger.kernel.org
Subject: Possible bug in nfs-utils source.
Date: Wed, 21 Jan 2009 14:25:48 -0800	[thread overview]
Message-ID: <4977A0EC.3050103@candelatech.com> (raw)

I'm working on adding support to bind to local addresses, and
I noticed this code in nfs/getport.c

I believe the sizeof should probably be sizeof(*lb_addr) ?

unsigned short nfs_getlocalport(const rpcprot_t program,
				const rpcvers_t version,
				const unsigned short protocol)
{
	struct sockaddr_storage address;
	struct sockaddr *lb_addr = (struct sockaddr *)&address;
	socklen_t lb_len = sizeof(lb_addr);
	unsigned short port = 0;

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


             reply	other threads:[~2009-01-21 22:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 22:25 Ben Greear [this message]
2009-01-21 22:37 ` Possible bug in nfs-utils source Chuck Lever
2009-01-21 22:53   ` Ben Greear
2009-01-22  0:00   ` Ben Greear
2009-03-04 22:59     ` Steve Dickson

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=4977A0EC.3050103@candelatech.com \
    --to=greearb@candelatech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox