Re: [PATCH] nfsd: add IPv6 addr escaping to fs_location hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

(Also: how did you test this?)

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux