dfilter: treat carriage returns as whitespace

Fixes #18595
This commit is contained in:
Peter Wu 2022-11-03 17:31:29 +00:00 committed by Gerald Combs
parent 16afad10fb
commit df478a365d
2 changed files with 5 additions and 1 deletions

View File

@ -143,7 +143,7 @@ hyphen-bytes {hex2}(-{hex2})+
%%
[[:blank:]\n]+ {
[[:blank:]\n\r]+ {
update_location(yyextra, yytext);
}

View File

@ -124,6 +124,10 @@ class case_syntax(unittest.TestCase):
dfilter = "icmp and ((icmp.type > 0 and icmp.type < 8) or icmp.type > 8)"
checkDFilterSucceed(dfilter)
def test_whitespace(self, checkDFilterSucceed):
dfilter = '\ttcp.stream \r\n== 1'
checkDFilterSucceed(dfilter)
@fixtures.uses_fixtures
class case_equality(unittest.TestCase):
trace_file = "sip.pcapng"