aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff <jlayton@redhat.com>2007-07-06 17:13:08 -0400
committerSteve French <sfrench@us.ibm.com>2007-07-06 17:13:08 -0400
commitd20acd09e3bf89aa23af034b8c2d0f5653577ea9 (patch)
tree9a4b5d3f2731723ef9544c1a7402bb34c3215cd7
parent38c10a1ddb24b9fa9f25b6c21d0390a9723ae6d6 (diff)
[CIFS] ipv6 support no longer experimental
Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r--fs/cifs/cifsfs.h2
-rw-r--r--fs/cifs/netmisc.c61
2 files changed, 1 insertions, 62 deletions
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index af3689bfa38e..ee8ab87f27aa 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -101,5 +101,5 @@ extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t);
101extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); 101extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
102extern int cifs_ioctl (struct inode *inode, struct file *filep, 102extern int cifs_ioctl (struct inode *inode, struct file *filep,
103 unsigned int command, unsigned long arg); 103 unsigned int command, unsigned long arg);
104#define CIFS_VERSION "1.49" 104#define CIFS_VERSION "1.50"
105#endif /* _CIFSFS_H */ 105#endif /* _CIFSFS_H */
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 53e304d59544..b388c356fde0 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -135,7 +135,6 @@ static const struct smb_to_posix_error mapping_table_ERRHRD[] = {
135int 135int
136cifs_inet_pton(int address_family, char *cp,void *dst) 136cifs_inet_pton(int address_family, char *cp,void *dst)
137{ 137{
138#ifdef CONFIG_CIFS_EXPERIMENTAL
139 int ret = 0; 138 int ret = 0;
140 139
141 /* calculate length by finding first slash or NULL */ 140 /* calculate length by finding first slash or NULL */
@@ -152,66 +151,6 @@ cifs_inet_pton(int address_family, char *cp,void *dst)
152 if (ret > 0) 151 if (ret > 0)
153 ret = 1; 152 ret = 1;
154 return ret; 153 return ret;
155#else
156 int value;
157 int digit;
158 int i;
159 char temp;
160 char bytes[4];
161 char *end = bytes;
162 static const int addr_class_max[4] =
163 { 0xffffffff, 0xffffff, 0xffff, 0xff };
164
165 if(address_family != AF_INET)
166 return -EAFNOSUPPORT;
167
168 for (i = 0; i < 4; i++) {
169 bytes[i] = 0;
170 }
171
172 temp = *cp;
173
174 while (TRUE) {
175 if (!isdigit(temp))
176 return 0;
177
178 value = 0;
179 digit = 0;
180 for (;;) {
181 if (isascii(temp) && isdigit(temp)) {
182 value = (value * 10) + temp - '0';
183 temp = *++cp;
184 digit = 1;
185 } else
186 break;
187 }
188
189 if (temp == '.') {
190 if ((end > bytes + 2) || (value > 255))
191 return 0;
192 *end++ = value;
193 temp = *++cp;
194 } else if (temp == ':') {
195 cFYI(1,("IPv6 addresses not supported for CIFS mounts yet"));
196 return -1;
197 } else
198 break;
199 }
200
201 /* check for last characters */
202 if (temp != '\0' && (!isascii(temp) || !isspace(temp)))
203 if (temp != '\\') {
204 if (temp != '/')
205 return 0;
206 else
207 (*cp = '\\'); /* switch the slash the expected way */
208 }
209 if (value > addr_class_max[end - bytes])
210 return 0;
211
212 *((__be32 *)dst) = *((__be32 *) bytes) | htonl(value);
213 return 1; /* success */
214#endif /* EXPERIMENTAL */
215} 154}
216 155
217/***************************************************************************** 156/*****************************************************************************