]> git.ipfire.org Git - thirdparty/suricata.git/commit
ftp-data: fix direction for active mode commands
authorVictor Julien <vjulien@oisf.net>
Sat, 30 Apr 2022 14:54:07 +0000 (16:54 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 3 May 2022 11:30:17 +0000 (13:30 +0200)
commit35f335ea86deede6aad1dd3a11d8bf6e7d0e2458
tree96b2e9ac3b17daa03d193294beb5af537030fe76
parent3a249507b71d9ed2e97740c708006868b213e63a
ftp-data: fix direction for active mode commands

Set correct direction for PORT mode, where the server connects
to the client.

The direction is not also strictly enforced. No data in the wrong
direction will be accepted to setup the file or to be added to the
file after setup.

This also fixes files getting closed twice.

Adds some general cleanups.

Bug: #3542.
(cherry picked from commit 07bf9214513e54e04508c055bb8ed29aa3bce60f)
src/app-layer-ftp.c