* [PATCH] libxt_tcp: print space before, not after "flags:"
@ 2012-08-20 16:52 Andreas Schwab
2012-08-21 10:37 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2012-08-20 16:52 UTC (permalink / raw)
To: netfilter-devel
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
---
extensions/libxt_tcp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/extensions/libxt_tcp.c b/extensions/libxt_tcp.c
index e849fa2..bbdec45 100644
--- a/extensions/libxt_tcp.c
+++ b/extensions/libxt_tcp.c
@@ -278,11 +278,10 @@ static void
print_flags(uint8_t mask, uint8_t cmp, int invert, int numeric)
{
if (mask || invert) {
- printf("flags:%s", invert ? "!" : "");
+ printf(" flags:%s", invert ? "!" : "");
if (numeric)
- printf(" 0x%02X/0x%02X", mask, cmp);
+ printf("0x%02X/0x%02X", mask, cmp);
else {
- printf(" ");
print_tcpf(mask);
printf("/");
print_tcpf(cmp);
--
1.7.12
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libxt_tcp: print space before, not after "flags:"
2012-08-20 16:52 [PATCH] libxt_tcp: print space before, not after "flags:" Andreas Schwab
@ 2012-08-21 10:37 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2012-08-21 10:37 UTC (permalink / raw)
To: Andreas Schwab; +Cc: netfilter-devel
On Mon, Aug 20, 2012 at 06:52:36PM +0200, Andreas Schwab wrote:
> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
> ---
> extensions/libxt_tcp.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/extensions/libxt_tcp.c b/extensions/libxt_tcp.c
> index e849fa2..bbdec45 100644
> --- a/extensions/libxt_tcp.c
> +++ b/extensions/libxt_tcp.c
> @@ -278,11 +278,10 @@ static void
> print_flags(uint8_t mask, uint8_t cmp, int invert, int numeric)
> {
> if (mask || invert) {
> - printf("flags:%s", invert ? "!" : "");
> + printf(" flags:%s", invert ? "!" : "");
> if (numeric)
> - printf(" 0x%02X/0x%02X", mask, cmp);
> + printf("0x%02X/0x%02X", mask, cmp);
> else {
> - printf(" ");
> print_tcpf(mask);
> printf("/");
> print_tcpf(cmp);
Right, iptables -L -n is broken indeed:
tcp dpt:10flags: 0x17/0x02
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-21 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 16:52 [PATCH] libxt_tcp: print space before, not after "flags:" Andreas Schwab
2012-08-21 10:37 ` Pablo Neira Ayuso
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).