netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iptables RFC 0/4] revisit RESTART log
@ 2019-05-20 14:41 Pablo Neira Ayuso
  2019-05-20 14:41 ` [PATCH iptables RFC 1/4] nft: don't check for table existence from __nft_table_flush() Pablo Neira Ayuso
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Pablo Neira Ayuso @ 2019-05-20 14:41 UTC (permalink / raw)
  To: netfilter-devel; +Cc: fw, phil

This still does not work, still searching for more bugs here.

Patch 1) Remove skip logic from __nft_table_flush(), before we
	 hit ERESTART. Better do not preventively skip table flush.

Patch 2) Keeps the original cache, while we introduce a new cache
         that is used when we hit ERESTART.

Patch 3) Remove NFT_COMPAT_TABLE_ADD case from refresh transaction,
         I don't find a scenario for this.

Patch 4) Reevaluate based on the existing cache, not on the previous
         object state. Original commit doesn't mention, but
	 NFT_COMPAT_CHAIN_USER_ADD only makes sense to me to do
	 the special handling from h->noflush.

I can still see the test still fails most of the time with:

line 5: CHAIN_USER_ADD failed (File exists): chain UC-0

which should not happen if table exists, because a flush should have
happened before.

Pablo Neira Ayuso (4):
  nft: don't check for table existence from __nft_table_flush()
  nft: keep original cache in case of ERESTART
  nft: don't skip table addition from ERESTART
  nft: don't care about previous state in RESTART

 iptables/nft.c | 77 +++++++++++++++++++++++++++++++---------------------------
 iptables/nft.h |  3 ++-
 2 files changed, 43 insertions(+), 37 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-05-20 15:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20 14:41 [PATCH iptables RFC 0/4] revisit RESTART log Pablo Neira Ayuso
2019-05-20 14:41 ` [PATCH iptables RFC 1/4] nft: don't check for table existence from __nft_table_flush() Pablo Neira Ayuso
2019-05-20 14:41 ` [PATCH iptables RFC 2/4] nft: keep original cache in case of ERESTART Pablo Neira Ayuso
2019-05-20 14:41 ` [PATCH iptables RFC 3/4] nft: don't skip table addition from ERESTART Pablo Neira Ayuso
2019-05-20 14:41 ` [PATCH iptables RFC 4/4] nft: don't care about previous state in RESTART Pablo Neira Ayuso
2019-05-20 14:49   ` Pablo Neira Ayuso
2019-05-20 14:59     ` Pablo Neira Ayuso
2019-05-20 15:06     ` Pablo Neira Ayuso
2019-05-20 15:12       ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).