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>
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