From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft,v2] scanner: handle files with CRLF line terminators
Date: Thu, 8 Dec 2022 22:23:25 +0100 [thread overview]
Message-ID: <Y5JVzQjSLS9UsDOn@salvia> (raw)
In-Reply-To: <20221208014151.529052-1-pablo@netfilter.org>
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.
prev parent reply other threads:[~2022-12-08 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 1:41 [PATCH nft,v2] scanner: handle files with CRLF line terminators Pablo Neira Ayuso
2022-12-08 21:23 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y5JVzQjSLS9UsDOn@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.