libipt_conntrack.c iptables-save bug [PATCH]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
libipt_conntrack.c in several places also lacks a white-space character after the '!' prefix of an invertable argument.
Since I don't know what the policy is with regard to the print() and save() functions, a temporary fix would be to simply add the missing spaces to the main print sub-function, although they would be printed for iptables -L then, too, and not just for iptables-save. A different solution would need bigger changes to libipt_conntrack.c.
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
iD8DBQE94tzI0iMVcrivHFQRAjtaAJ0SxRseqfsne29+PTTepmyfmTcijgCggLi+ tdc6Fx2KCOSbWKFC7/ILwVI=
=TTzB
-----END PGP SIGNATURE-----
extensions/libipt_conntrack.c +3 -3
@@ -409,7 +409,7 @@if (sinfo->flags &IPT_CONNTRACK_STATE ) {printf ("%sctstate " , optpfx);if (sinfo->invflags &IPT_CONNTRACK_STATE ) -fputc ('!' , stdout); +printf ("! " );print_state (sinfo->statemask); }
@@ -456,14 +456,14 @@if (sinfo->flags &IPT_CONNTRACK_STATUS ) {printf ("%sctstatus " , optpfx);if (sinfo->invflags &IPT_CONNTRACK_STATE ) -fputc ('!' , stdout); +printf ("! " );print_status (sinfo->statusmask); }if (sinfo->flags &IPT_CONNTRACK_EXPIRES ) {printf ("%sctexpire " , optpfx);if (sinfo->invflags &IPT_CONNTRACK_EXPIRES ) -fputc ('!' , stdout); +printf ("! " );if (sinfo->expires_max == sinfo->expires_min)printf ("%lu " , sinfo->expires_min);
Quoted 2 lines · Michael Schwendt
libipt_conntrack.cin several places also lacks a white-space character after the '!' prefix of an invertable argument.
thanks, patch applied.
Signature · 5 lines
Live long and prosper - Harald Welte / [email protected] http://www.gnumonks.org/ ============================================================================ GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M- V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)