Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftplib passive ftp problem on multihomed clients #44590

Open
timbaum mannequin opened this issue Feb 16, 2007 · 4 comments
Open

ftplib passive ftp problem on multihomed clients #44590

timbaum mannequin opened this issue Feb 16, 2007 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@timbaum
Copy link
Mannequin

timbaum mannequin commented Feb 16, 2007

BPO 1661754
Nosy @pitrou, @giampaolo
Superseder
  • bpo-8594: Add a "source_address" option to ftplib
  • Files
  • ftplib.patch: patch in unified forward diff format
  • ftplib.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/giampaolo'
    closed_at = None
    created_at = <Date 2007-02-16.19:36:59.000>
    labels = ['type-bug', 'library']
    title = 'ftplib passive ftp problem on multihomed clients'
    updated_at = <Date 2011-03-03.22:24:05.291>
    user = 'https://bugs.python.org/timbaum'

    bugs.python.org fields:

    activity = <Date 2011-03-03.22:24:05.291>
    actor = 'giampaolo.rodola'
    assignee = 'giampaolo.rodola'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2007-02-16.19:36:59.000>
    creator = 'timbaum'
    dependencies = []
    files = ['7766', '20990']
    hgrepos = []
    issue_num = 1661754
    keywords = ['patch']
    message_count = 4.0
    messages = ['51894', '104750', '130007', '130009']
    nosy_count = 4.0
    nosy_names = ['exarkun', 'pitrou', 'giampaolo.rodola', 'timbaum']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = '8594'
    type = 'behavior'
    url = 'https://bugs.python.org/issue1661754'
    versions = ['Python 3.1', 'Python 2.7', 'Python 3.2', 'Python 3.3']

    @timbaum
    Copy link
    Mannequin Author

    timbaum mannequin commented Feb 16, 2007

    When using passive FTP on a multihomed client, data connections should originate from the same address as the control connection. Otherwise, the connection can be blocked by stateful firewalls or rejected by the ftp server. The ftplib.py library allows the OS to choose the local address for each passive data connection, so connections fail intermittently if the operating system selects a different local address than used for the initial connection.

    The attached patch binds the passive-mode data connection to the same local address as the control connection.

    @timbaum timbaum mannequin added stdlib Python modules in the Lib dir labels Feb 16, 2007
    @devdanzin devdanzin mannequin added type-bug An unexpected behavior, bug, or error labels Mar 30, 2009
    @giampaolo
    Copy link
    Contributor

    bpo-8594 is related with this one.

    @giampaolo
    Copy link
    Contributor

    Patch in attachment updates the previous one which no longer applies cleanly in py 3.3.
    The control connection address is used for *both* passive (PASV) and active (PORT) connections, which is the same approach I used in pyftpdlib.

    Removed test_source_address_passive_connection test because we do not want that the same (host, port) is used for both control and data connections.

    I think it makes sense to port this patch in previous python versions as well.

    @giampaolo
    Copy link
    Contributor

    we do not want that the same (host, port) is used for
    both control and data connections.

    I meant *port*, not (host, port).

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant