On Thu, Dec 08, 2022 at 02:41:51AM +0100, Pablo Neira Ayuso wrote: > Extend scanner.l to deal with CRLF, otherwise -f fails to load: > > # file test.nft > test.nft: ASCII text, with CRLF, LF line terminators > # nft -f test.nft > test.nft:1:13-13: Error: syntax error, unexpected junk > table ip x { > ^ > > Update full comment line to take CRLF too. > > Add test to cover this usecase. I am considering to keep back this patch. At quick glance, other existing userspace tooling in Linux do not support for CRLF files. I might follow up with a different approach: provide a more meaningful error message, instead of saying "unexpected junk", report to the users that the file contains CRLF and that needs to be fixed.