netfilter: xt_conntrack: support matching on port ranges
Subsystems (2)
Add support for matching on port ranges to the conntrack match. iptables patch will follow soon.
commit d9f56e82963575ec3275874e1529ec36683a082c
Author: Patrick McHardy <[email protected]> Date: Wed Dec 15 08:07:19 2010 +0100
netfilter: xt_conntrack: support matching on port ranges
Add a new revision 3 that contains port ranges for all of origsrc, origdst, replsrc and repldst. The high ports are appended to the original v2 data structure to allow sharing most of the code with v1 and v2. Use of the revision specific port matching function is made dependant on par->match->revision.
Signed-off-by Patrick McHardy <[email protected]>
include/linux/netfilter/xt_conntrack.h +15 -0
@@ -58,4 +58,19 @@ struct xt_conntrack_mtinfo2 { __u16 state_mask, status_mask; }; +struct xt_conntrack_mtinfo3 { +union nf_inet_addr origsrc_addr, origsrc_mask; +union nf_inet_addr origdst_addr, origdst_mask; +union nf_inet_addr replsrc_addr, replsrc_mask; +union nf_inet_addr repldst_addr, repldst_mask; +__u32 expires_min, expires_max; +__u16 l4proto; +__u16 origsrc_port, origdst_port; +__u16 replsrc_port, repldst_port; +__u16 match_flags, invert_flags; +__u16 state_mask, status_mask; +__u16 origsrc_port_high, origdst_port_high; +__u16 replsrc_port_high, repldst_port_high; +}; +#endif /*_XT_CONNTRACK_H*/
net/netfilter/xt_conntrack.c +73 -2
99 lines not on this page · raw message
Pablo Neira Ayuso
maintainerQuoted 2 lines · Patrick McHardy
Add support for matching on port ranges to the conntrack match. iptables patch will follow soon.
Patrick, I have applied this one to my nf-next tree.