Parsing bug in libxt_conntrack.c 1.4.12
PATCH 1/1 Parsing bug in libxt_conntrack.c 1.4.12
Just discovered this little gem:
sami:/home/teastep/iptables# iptables -N foo sami:/home/teastep/iptables# iptables -A foo -m conntrack --ctorigdstport 22 iptables v1.4.12: conntrack rev 2 does not support port ranges Try `iptables -h' or 'iptables --help' for more information. sami:/home/teastep/iptables#
The attached seems to correct it.
-Tom
Signature · 4 lines
Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
commit 57c7c7995326a37c983ac6ca4026eb176595fb37
Author: Tom Eastep <[email protected]> Date: Thu Aug 18 15:09:14 2011 -0700
Correct parsing bug in libxt_conntrack.c
Signed-off-by Tom Eastep <[email protected]>
extensions/libxt_conntrack.c +4 -4
@@ -130,13 +130,13 @@ static const struct xt_option_entry conntrack2_mt_opts[] = { .flags = XTOPT_INVERT}, {.name = "ctexpire", .id = O_CTEXPIRE, .type = XTTYPE_UINT32RC, .flags = XTOPT_INVERT}, - {.name = "ctorigsrcport", .id = O_CTORIGSRCPORT, .type = XTTYPE_PORT, + {.name = "ctorigsrcport", .id = O_CTORIGSRCPORT, .type = XTTYPE_PORTRC, .flags = XTOPT_INVERT | XTOPT_NBO}, - {.name = "ctorigdstport", .id = O_CTORIGDSTPORT, .type = XTTYPE_PORT, + {.name = "ctorigdstport", .id = O_CTORIGDSTPORT, .type = XTTYPE_PORTRC, .flags = XTOPT_INVERT | XTOPT_NBO}, - {.name = "ctreplsrcport", .id = O_CTREPLSRCPORT, .type = XTTYPE_PORT, + {.name = "ctreplsrcport", .id = O_CTREPLSRCPORT, .type = XTTYPE_PORTRC, .flags = XTOPT_INVERT | XTOPT_NBO}, - {.name = "ctrepldstport", .id = O_CTREPLDSTPORT, .type = XTTYPE_PORT, + {.name = "ctrepldstport", .id = O_CTREPLDSTPORT, .type = XTTYPE_PORTRC, .flags = XTOPT_INVERT | XTOPT_NBO}, {.name = "ctdir", .id = O_CTDIR, .type = XTTYPE_STRING}, XTOPT_TABLEEND,
Quoted 7 lines · Tom Eastep
Just discovered this little gem:
sami:/home/teastep/iptables# iptables -N foo sami:/home/teastep/iptables# iptables -A foo -m conntrack --ctorigdstport 22 iptables v1.4.12: conntrack rev 2 does not support port ranges Try `iptables -h' or 'iptables --help' for more information. sami:/home/teastep/iptables#
Thanks for your reminder (via priv). I have taken your patch, but also the liberty to fix the actual cause.
Pending merge, you can see the tree/commits atgit://dev.medozas.de/iptables fixes-2