netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ip6tables formatting problem
@ 2008-02-06  0:51 Jamie Strandboge
  2008-02-19 15:11 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jamie Strandboge @ 2008-02-06  0:51 UTC (permalink / raw)
  To: netfilter-devel

I am sending this here as bugzilla.netfilter.org is down. I am not
subscribed to the list, so please CC me on replies.

ip6tables improperly displays the destination address when the address
is longer than 18 characters.  Here is example output:
# ip6tables -L -n
...
DROP       tcp      2001:db8::/32        2001:db8:3:4:5:6:7:8/128tcp spt:25
...

Proper formatting should have a space between '2001:db8:3:4:5:6:7:8/128'
and 'tcp'.

Here is a patch to do just that:
--- iptables-1.3.8.0debian1.orig/iptables/ip6tables.c
+++ iptables-1.3.8.0debian1/iptables/ip6tables.c
@@ -1427,14 +1427,14 @@
        fputc(fw->ipv6.invflags & IP6T_INV_DSTIP ? '!' : ' ', stdout);
        if (!memcmp(&fw->ipv6.dmsk, &in6addr_any, sizeof in6addr_any)
            && !(format & FMT_NUMERIC))
-               printf(FMT("%-19s","-> %s"), "anywhere");
+               printf(FMT("%-19s ","-> %s"), "anywhere");
        else {
                if (format & FMT_NUMERIC)
                        sprintf(buf, "%s", addr_to_numeric(&(fw->ipv6.dst)));
                else
                        sprintf(buf, "%s", addr_to_anyname(&(fw->ipv6.dst)));
                strcat(buf, mask_to_numeric(&(fw->ipv6.dmsk)));
-               printf(FMT("%-19s","-> %s"), buf);
+               printf(FMT("%-19s ","-> %s"), buf);
        }

        if (format & FMT_NOTABLE)

Jamie Strandboge

--
Email: jamie@strandboge.com
IRC:   jdstrand


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

* Re: [PATCH] ip6tables formatting problem
  2008-02-06  0:51 [PATCH] ip6tables formatting problem Jamie Strandboge
@ 2008-02-19 15:11 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2008-02-19 15:11 UTC (permalink / raw)
  To: Jamie Strandboge; +Cc: netfilter-devel

Jamie Strandboge wrote:
> I am sending this here as bugzilla.netfilter.org is down. I am not
> subscribed to the list, so please CC me on replies.
> 
> ip6tables improperly displays the destination address when the address
> is longer than 18 characters.  Here is example output:
> # ip6tables -L -n
> ...
> DROP       tcp      2001:db8::/32        2001:db8:3:4:5:6:7:8/128tcp spt:25
> ...
> 
> Proper formatting should have a space between '2001:db8:3:4:5:6:7:8/128'
> and 'tcp'.


Thanks, but this doesn't apply to the current version. Could you
send a patch against SVN (or a daily snapshot) please?

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

end of thread, other threads:[~2008-02-19 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-06  0:51 [PATCH] ip6tables formatting problem Jamie Strandboge
2008-02-19 15:11 ` Patrick McHardy

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).