Another save/restore buglet
PATCH 1/1 Another save/restore buglet
This time, it's the CONNMARK extention that is producing saved output that won't restore.
gateway:/etc/test# iptables-save > save gateway:/etc/test# iptables-restore < save iptables-restore v1.3.1: Bad MASK value `ff' Error occurred at line: 24 Try `iptables-restore -h' or 'iptables-restore --help' for more information. gateway:/etc/test#
Patch attached.
-Tom
Signature · 4 lines
Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ [email protected] PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key
libipt_CONNMARK.c renamed from libipt_CONNMARK.c~ +1 -1
@@ -165,7 +165,7 @@ print_mask(const char *text, unsigned long mask) {if (mask != ~0UL ) -printf ("%s%lx" , text, mask); +printf ("%s0x%lx" , text, mask); }#endif
Quoted 11 lines · Tom Eastep
This time, it's the CONNMARK extention that is producing saved output that won't restore.
gateway:/etc/test# iptables-save > save gateway:/etc/test# iptables-restore < save iptables-restore v1.3.1: Bad MASK value `ff' Error occurred at line: 24 Try `iptables-restore -h' or 'iptables-restore --help' for more information. gateway:/etc/test#Patch attached.
You've missed the 64-bit variant ;-)
Signature · 3 lines
The only thing necessary for the triumph of evil
is for good men to do nothing.
- Edmund Burkelibipt_CONNMARK.c +2 -2
@@ -150,7 +150,7 @@ print_mask(const char *text, unsigned long long mask) {if (mask != ~0ULL ) -printf ("%s%llx" , text, mask); +printf ("%s0x%llx" , text, mask); }#else
@@ -165,7 +165,7 @@ print_mask(const char *text, unsigned long mask) {if (mask != ~0UL ) -printf ("%s%lx" , text, mask); +printf ("%s0x%lx" , text, mask); }#endif
Patrick McHardy
AppliedQuoted 5 lines · Pawel Sikora
Quoted 2 lines · Tom Eastep
Patch attached.
You've missed the 64-bit variant ;-)
Applied, thanks everyone.