[PATCH] pnfsd: Prevent ipv6 address truncation in /proc/fs/nfsd/pnfs_dlm_device

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

 



From: Michael Groshans <groshans@xxxxxxxxx>

ipv6 addresses in /proc/fs/nfsd/pnfs_dlm_device were being truncated because the
length was determined by looking for the next colon. Changed to use strlen()
instead.

Signed-off by: Michael Groshans <groshans@xxxxxxxxx>
---
 fs/nfsd/nfs4pnfsdlm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c
index 006ded5..0068ba0 100644
--- a/fs/nfsd/nfs4pnfsdlm.c
+++ b/fs/nfsd/nfs4pnfsdlm.c
@@ -165,7 +165,7 @@ nfsd4_set_pnfs_dlm_device(char *pnfs_dlm_device, int len)
 
 	/* data server list */
 	/* FIXME: need to check for comma separated valid ip format */
-	len = strcspn(bufp, ":");
+	len = strlen(bufp);
 	if (len > NFSD_DLM_DS_LIST_MAX)
 		goto out_free;
 	memcpy(new->ds_list, bufp, len);
-- 
1.7.3.4
--
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