diff options
author | Patrick McHardy <kaber@trash.net> | 2008-04-14 09:15:52 (GMT) |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-04-14 09:15:52 (GMT) |
commit | 5e8fbe2ac8a3f1e34e7004c5750ef59bf9304f82 (patch) | |
tree | 7a42f4fa1825e215e3ca3f2d3b2f66a865294ce0 /net/netfilter/xt_conntrack.c | |
parent | 5f7da4d26d421f3bdf10c3bbdb86ffc3a12a84f2 (diff) | |
download | linux-fsl-qoriq-5e8fbe2ac8a3f1e34e7004c5750ef59bf9304f82.tar.xz |
[NETFILTER]: nf_conntrack: add tuplehash l3num/protonum accessors
Add accessors for l3num and protonum and get rid of some overly long
expressions.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/xt_conntrack.c')
-rw-r--r-- | net/netfilter/xt_conntrack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c index 0c50b28..d61412f 100644 --- a/net/netfilter/xt_conntrack.c +++ b/net/netfilter/xt_conntrack.c @@ -65,7 +65,7 @@ conntrack_mt_v0(const struct sk_buff *skb, const struct net_device *in, } if (sinfo->flags & XT_CONNTRACK_PROTO && - FWINV(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum != + FWINV(nf_ct_protonum(ct) != sinfo->tuple[IP_CT_DIR_ORIGINAL].dst.protonum, XT_CONNTRACK_PROTO)) return false; @@ -174,7 +174,7 @@ ct_proto_port_check(const struct xt_conntrack_mtinfo1 *info, tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; if ((info->match_flags & XT_CONNTRACK_PROTO) && - (tuple->dst.protonum == info->l4proto) ^ + (nf_ct_protonum(ct) == info->l4proto) ^ !(info->invert_flags & XT_CONNTRACK_PROTO)) return false; |