All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: "Adamson, Dros" <Weston.Adamson@netapp.com>
Cc: "<SteveD@redhat.com>" <SteveD@redhat.com>,
	"<linux-nfs@vger.kernel.org>" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfsd: add IPv6 addr escaping to fs_location hosts
Date: Tue, 1 May 2012 13:01:47 -0400	[thread overview]
Message-ID: <20120501170147.GA31034@fieldses.org> (raw)
In-Reply-To: <975131E5-DBB4-4C78-904E-EA577B748DD4@netapp.com>

On Tue, May 01, 2012 at 04:09:55PM +0000, Adamson, Dros wrote:
> 
> On Apr 27, 2012, at 7:25 AM, J. Bruce Fields wrote:
> 
> > On Tue, Apr 24, 2012 at 10:59:37AM -0400, Weston Andros Adamson wrote:
> >> The fs_location->hosts list is split on colons, but this doesn't work when
> >> IPv6 addresses are used (they contain colons).
> >> This patch adds the function nfsd4_encode_components_esc() to
> >> allow the caller to specify escape characters when splitting on 'sep'.
> >> In order to fix referrals, this patch must be used with the mountd patch
> >> that similarly fixes IPv6 [] escaping.
> > 
> > Thanks, looks fine, applying with one trivial change:
> > 
> >> -		for (; *end && (*end != sep); end++)
> >> -			; /* Point to end of component */
> >> +		bool found_esc = false;
> >> +
> >> +		/* try to parse as esc_start, ..., esc_end, sep */
> >> +		if (*str == esc_enter) {
> >> +			for (; *end && (*end != esc_exit); end++);
> > 
> > I kinda like keeping the semicolon on its own line here.  Tastes may
> > differ.
> 
> Yeah, as Jim pointed out checkpatch will complain if it's not -- you already found my updated diff.
> 
> > (Also: how did you test this?)
> 
> I testsed this patch along with the corresponding mountd patch using two servers:
> 
> [fc00::10] - exporting /export, /export/refer @ [fc00:41]:/export
> [fc00::41] - exporting /export
> 
> On a client machine (with recently posted client-side fix), I mount [fc00::10]:/export on /mnt, then cd to /mnt/refer.
> 
> Without these patches, wireshark sees a list of referral locations: "[fc00", "", "10]", which is obviously wrong.
> With these patches the cd to /mnt/refer works as [fc00::41]:/export is mounted at /mnt/refer.

Sounds good.  Thanks!

--b.

  reply	other threads:[~2012-05-01 17:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 14:59 [PATCH] nfsd: add IPv6 addr escaping to fs_location hosts Weston Andros Adamson
2012-04-27 11:25 ` J. Bruce Fields
2012-04-27 11:42   ` Jim Rees
2012-05-01 16:09   ` Adamson, Dros
2012-05-01 17:01     ` J. Bruce Fields [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-24 15:07 Weston Andros Adamson
2012-04-27 12:48 ` J. Bruce Fields

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=20120501170147.GA31034@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=SteveD@redhat.com \
    --cc=Weston.Adamson@netapp.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.