]>
Commit | Line | Data |
---|---|---|
9b291425 GKH |
1 | From 5a64e56976f1ba98743e1678c0029a98e9034c81 Mon Sep 17 00:00:00 2001 |
2 | From: Benjamin Coddington <bcodding@redhat.com> | |
3 | Date: Sun, 7 Dec 2014 16:05:47 -0500 | |
4 | Subject: nfsd4: fix xdr4 inclusion of escaped char | |
5 | ||
6 | From: Benjamin Coddington <bcodding@redhat.com> | |
7 | ||
8 | commit 5a64e56976f1ba98743e1678c0029a98e9034c81 upstream. | |
9 | ||
10 | Fix a bug where nfsd4_encode_components_esc() includes the esc_end char as | |
11 | an additional string encoding. | |
12 | ||
13 | Signed-off-by: Benjamin Coddington <bcodding@redhat.com> | |
14 | Fixes: e7a0444aef4a "nfsd: add IPv6 addr escaping to fs_location hosts" | |
15 | Signed-off-by: J. Bruce Fields <bfields@redhat.com> | |
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
17 | ||
18 | --- | |
19 | fs/nfsd/nfs4xdr.c | 3 +++ | |
20 | 1 file changed, 3 insertions(+) | |
21 | ||
22 | --- a/fs/nfsd/nfs4xdr.c | |
23 | +++ b/fs/nfsd/nfs4xdr.c | |
24 | @@ -1795,6 +1795,9 @@ static __be32 nfsd4_encode_components_es | |
25 | } | |
26 | else | |
27 | end++; | |
28 | + if (found_esc) | |
29 | + end = next; | |
30 | + | |
31 | str = end; | |
32 | } | |
33 | pathlen = htonl(xdr->buf->len - pathlen_offset); |