system-tests: Workaround for pyftpdlib bug handling IPv6 addresses.
authorJarno Rajahalme <jarno@ovn.org>
Wed, 25 Nov 2015 23:19:38 +0000 (15:19 -0800)
committerJarno Rajahalme <jarno@ovn.org>
Wed, 25 Nov 2015 23:30:16 +0000 (15:30 -0800)
Hack around a bug in pyftpdlib that rejects EPRT connection due to
mismatching textual representation of the IPv6 address when the
address is not in the normalized format.  This happens when the
control connection is mangled by Linux NAT.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
tests/test-l7.py

index faec2bc..c89fcf2 100755 (executable)
@@ -37,6 +37,10 @@ def get_ftpd():
         class OVSFTPHandler(FTPHandler):
             authorizer = DummyAuthorizer()
             authorizer.add_anonymous("/tmp")
+            # Hack around a bug in pyftpdlib, which rejects EPRT
+            # connection due to mismatching textual representation of
+            # the IPv6 address.
+            permit_foreign_addresses = True
         server = [FTPServer, OVSFTPHandler, 21]
     except ImportError:
         server = None