Skip to content

Commit 3a06902

Browse files
thomasjfoxummakynes
authored andcommitted
netfilter: nf_conntrack_ftp: Fix debug output
The find_pattern() debug output was printing the 'skip' character. This can be a NULL-byte and messes up further pr_debug() output. Output without the fix: kernel: nf_conntrack_ftp: Pattern matches! kernel: nf_conntrack_ftp: Skipped up to `<7>nf_conntrack_ftp: find_pattern `PORT': dlen = 8 kernel: nf_conntrack_ftp: find_pattern `EPRT': dlen = 8 Output with the fix: kernel: nf_conntrack_ftp: Pattern matches! kernel: nf_conntrack_ftp: Skipped up to 0x0 delimiter! kernel: nf_conntrack_ftp: Match succeeded! kernel: nf_conntrack_ftp: conntrack_ftp: match `172,17,0,100,200,207' (20 bytes at 4150681645) kernel: nf_conntrack_ftp: find_pattern `PORT': dlen = 8 Signed-off-by: Thomas Jarosch <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 3cf2f45 commit 3a06902

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_conntrack_ftp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int find_pattern(const char *data, size_t dlen,
322322
i++;
323323
}
324324

325-
pr_debug("Skipped up to `%c'!\n", skip);
325+
pr_debug("Skipped up to 0x%hhx delimiter!\n", skip);
326326

327327
*numoff = i;
328328
*numlen = getnum(data + i, dlen - i, cmd, term, numoff);

0 commit comments

Comments
 (0)