You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2007/10/09 20:10:00 UTC

svn commit: r583247 - /httpd/mod_ftp/trunk/modules/ftp/ftp_util.c

Author: wrowe
Date: Tue Oct  9 11:10:00 2007
New Revision: 583247

URL: http://svn.apache.org/viewvc?rev=583247&view=rev
Log:
Permit third numerical form of IPv6 addresses, e.g. ::n.n.n.n
although this form will almost certainly fail proxyport equality tests.

Modified:
    httpd/mod_ftp/trunk/modules/ftp/ftp_util.c

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_util.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_util.c?rev=583247&r1=583246&r2=583247&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_util.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_util.c Tue Oct  9 11:10:00 2007
@@ -59,19 +59,19 @@
             return FTP_REPLY_SYNTAX_ERROR;
     }
 
-    if (*family == APR_INET)
-        sep = '.';
+    argv = arg;
+    if (*arg == delim)
+        return FTP_REPLY_SYNTAX_ERROR;
+    if (*family == APR_INET) {
+        while (isdigit(*arg) || (*arg == '.')) ++arg;
+    }
 #if APR_HAVE_IPV6
-    else if (*family == APR_INET6)
-        sep = ':';
+    else if (*family == APR_INET6) {
+        while (isdigit(*arg) || (*arg == ':') || (*arg == '.')) ++arg;
+    }
 #endif
     else
         return FTP_REPLY_BAD_PROTOCOL;
-    
-    argv = arg;
-    if (*arg == delim)
-        return FTP_REPLY_SYNTAX_ERROR;
-    while (isdigit(*arg) || (*arg == sep)) ++arg;
     if (*arg != delim)
         return FTP_REPLY_SYNTAX_ERROR;
     *(arg++) = '\0';



Re: svn commit: r583247 - /httpd/mod_ftp/trunk/modules/ftp/ftp_util.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
wrowe@apache.org wrote:
> Permit third numerical form of IPv6 addresses, e.g. ::n.n.n.n
> although this form will almost certainly fail proxyport equality tests.

With this patch, we now implement RFC2428, which was my only hesitation
to at least throwing out an alpha release for users to experiment with.
However it does need a bit of love in the proxy IP comparisons to tolerate
the more bizzare aspects of IPV6_MAPPED_IPV4 addresses, and perhaps decode
the ::n.n.n.n form into a pure ipv6 form for proxy IP comparison.

There are some remaining build questions, such as how to make it simpler
to build/install from the /top level/ of the package but still using
apxs for simplicity (instead of descending into modules/ftp and invoking
make -f Makefile.apxs there); as well we need to ensure it plugs in very
smoothly if they want to simply unpack on top of httpd, without reinvoking
buildconf, of course.

But does anyone have other concerns before we prepare to release a first
alpha version here of the module?

Bill

Re: svn commit: r583247 - /httpd/mod_ftp/trunk/modules/ftp/ftp_util.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
wrowe@apache.org wrote:
> Permit third numerical form of IPv6 addresses, e.g. ::n.n.n.n
> although this form will almost certainly fail proxyport equality tests.

With this patch, we now implement RFC2428, which was my only hesitation
to at least throwing out an alpha release for users to experiment with.
However it does need a bit of love in the proxy IP comparisons to tolerate
the more bizzare aspects of IPV6_MAPPED_IPV4 addresses, and perhaps decode
the ::n.n.n.n form into a pure ipv6 form for proxy IP comparison.

There are some remaining build questions, such as how to make it simpler
to build/install from the /top level/ of the package but still using
apxs for simplicity (instead of descending into modules/ftp and invoking
make -f Makefile.apxs there); as well we need to ensure it plugs in very
smoothly if they want to simply unpack on top of httpd, without reinvoking
buildconf, of course.

But does anyone have other concerns before we prepare to release a first
alpha version here of the module?

Bill