netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 3/6] libxt_tcp: always print the mask parts
Date: Sat, 20 Aug 2011 21:24:50 +0200	[thread overview]
Message-ID: <1313868294-21471-4-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1313868294-21471-1-git-send-email-jengelh@medozas.de>

0xFF is unlikely to happen (given that ALL translates to 0x3F at
most), but assuming that through magic, 0xFF was put into memory,
iptables -S/iptables-save would ignore printing it, practically
outputting just one argument to --tcp-flags which currently wants two.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 extensions/libxt_tcp.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/extensions/libxt_tcp.c b/extensions/libxt_tcp.c
index 3940d91..e849fa2 100644
--- a/extensions/libxt_tcp.c
+++ b/extensions/libxt_tcp.c
@@ -357,9 +357,7 @@ static void tcp_save(const void *ip, const struct xt_entry_match *match)
 		if (tcpinfo->invflags & XT_TCP_INV_FLAGS)
 			printf(" !");
 		printf(" --tcp-flags ");
-		if (tcpinfo->flg_mask != 0xFF) {
-			print_tcpf(tcpinfo->flg_mask);
-		}
+		print_tcpf(tcpinfo->flg_mask);
 		printf(" ");
 		print_tcpf(tcpinfo->flg_cmp);
 	}
-- 
1.7.3.4


  parent reply	other threads:[~2011-08-20 19:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20 19:24 Fixes to iptables-1.4.12 Jan Engelhardt
2011-08-20 19:24 ` [PATCH 1/6] libxt_u32: fix missing allowance for inversion Jan Engelhardt
     [not found]   ` <CAA93jw6mpDL6rLXM+9SpAhafkDdKoSfhAxU8UM87vUqjuzjYJw@mail.gmail.com>
2011-08-21  7:25     ` Jan Engelhardt
2011-08-22 16:31       ` Dave Taht
2011-08-23  7:34         ` Jan Engelhardt
2011-08-20 19:24 ` [PATCH 2/6] libxt_set: update man page about kernel support on the feature Jan Engelhardt
2011-08-20 19:24 ` Jan Engelhardt [this message]
2011-08-20 19:24 ` [PATCH 4/6] doc: fix typo in libxt_TRACE Jan Engelhardt
2011-08-20 19:24 ` [PATCH 5/6] libxt_set: put differing variable names in directly Jan Engelhardt
2011-08-20 19:24 ` [PATCH 6/6] libxt_string: fix space around arguments Jan Engelhardt
2011-08-21  9:31 ` Fixes to iptables-1.4.12 Patrick McHardy

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=1313868294-21471-4-git-send-email-jengelh@medozas.de \
    --to=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --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 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).