Skip to content

Commit e560db9

Browse files
jasonishvictorjulien
authored andcommitted
ftp: don't match unset ftp.dynamic_port
Treat dyn_port 0 as an absent value so numeric comparisons do not match FTP transactions without a negotiated data port. Ticket: OISF#8392
1 parent dd600d0 commit e560db9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/detect-ftp-dynamic-port.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ static int DetectFtpDynamicPortMatch(DetectEngineThreadCtx *det_ctx, Flow *f, ui
8787
FTPTransaction *tx = (FTPTransaction *)txv;
8888
if (tx->command_descriptor.command_code == FTP_COMMAND_UNKNOWN)
8989
return 0;
90+
if (tx->dyn_port == 0)
91+
return 0;
9092

9193
const DetectU16Data *ftpd = (const DetectU16Data *)ctx;
9294

0 commit comments

Comments
 (0)