Netfilter-Devel Archive on
 help / color / Atom feed
From: Pablo Neira Ayuso <>
To: Phil Sutter <>
Subject: Re: [iptables PATCH 2/2] xtables-restore: Fix parser feed from line buffer
Date: Wed, 4 Dec 2019 18:47:10 +0100
Message-ID: <20191204174710.ory3vtyyj6t6lwmo@salvia> (raw)
In-Reply-To: <>

On Wed, Dec 04, 2019 at 10:06:06AM +0100, Phil Sutter wrote:
> When called with --noflush, xtables-restore would trip over chain lines:
> Parser uses strtok() to separate chain name, policy and counters which
> inserts nul-chars into the source string. Therefore strlen() can't be
> used anymore to find end of line. Fix this by caching line length before
> calling xtables_restore_parse_line().
> Fixes: 09cb517949e69 ("xtables-restore: Improve performance of --noflush operation")
> Signed-off-by: Phil Sutter <>

Acked-by: Pablo Neira Ayuso <>

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04  9:06 [iptables PATCH 1/2] Fix DEBUG build Phil Sutter
2019-12-04  9:06 ` [iptables PATCH 2/2] xtables-restore: Fix parser feed from line buffer Phil Sutter
2019-12-04 17:47   ` Pablo Neira Ayuso [this message]
2019-12-04 17:49 ` [iptables PATCH 1/2] Fix DEBUG build Pablo Neira Ayuso
2019-12-04 22:43   ` Phil Sutter

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204174710.ory3vtyyj6t6lwmo@salvia \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Netfilter-Devel Archive on

Archives are clonable:
	git clone --mirror netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ \
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone