aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/netfilter/nf_conntrack_tuple.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
index 45cb17cdcfd0..e69ab2e87597 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -132,34 +132,33 @@ struct nf_conntrack_tuple_hash
132 132
133#endif /* __KERNEL__ */ 133#endif /* __KERNEL__ */
134 134
135static inline int nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1, 135static inline int __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1,
136 const struct nf_conntrack_tuple *t2) 136 const struct nf_conntrack_tuple *t2)
137{ 137{
138 return (t1->src.u3.all[0] == t2->src.u3.all[0] && 138 return (t1->src.u3.all[0] == t2->src.u3.all[0] &&
139 t1->src.u3.all[1] == t2->src.u3.all[1] && 139 t1->src.u3.all[1] == t2->src.u3.all[1] &&
140 t1->src.u3.all[2] == t2->src.u3.all[2] && 140 t1->src.u3.all[2] == t2->src.u3.all[2] &&
141 t1->src.u3.all[3] == t2->src.u3.all[3] && 141 t1->src.u3.all[3] == t2->src.u3.all[3] &&
142 t1->src.u.all == t2->src.u.all && 142 t1->src.u.all == t2->src.u.all &&
143 t1->src.l3num == t2->src.l3num && 143 t1->src.l3num == t2->src.l3num);
144 t1->dst.protonum == t2->dst.protonum);
145} 144}
146 145
147static inline int nf_ct_tuple_dst_equal(const struct nf_conntrack_tuple *t1, 146static inline int __nf_ct_tuple_dst_equal(const struct nf_conntrack_tuple *t1,
148 const struct nf_conntrack_tuple *t2) 147 const struct nf_conntrack_tuple *t2)
149{ 148{
150 return (t1->dst.u3.all[0] == t2->dst.u3.all[0] && 149 return (t1->dst.u3.all[0] == t2->dst.u3.all[0] &&
151 t1->dst.u3.all[1] == t2->dst.u3.all[1] && 150 t1->dst.u3.all[1] == t2->dst.u3.all[1] &&
152 t1->dst.u3.all[2] == t2->dst.u3.all[2] && 151 t1->dst.u3.all[2] == t2->dst.u3.all[2] &&
153 t1->dst.u3.all[3] == t2->dst.u3.all[3] && 152 t1->dst.u3.all[3] == t2->dst.u3.all[3] &&
154 t1->dst.u.all == t2->dst.u.all && 153 t1->dst.u.all == t2->dst.u.all &&
155 t1->src.l3num == t2->src.l3num &&
156 t1->dst.protonum == t2->dst.protonum); 154 t1->dst.protonum == t2->dst.protonum);
157} 155}
158 156
159static inline int nf_ct_tuple_equal(const struct nf_conntrack_tuple *t1, 157static inline int nf_ct_tuple_equal(const struct nf_conntrack_tuple *t1,
160 const struct nf_conntrack_tuple *t2) 158 const struct nf_conntrack_tuple *t2)
161{ 159{
162 return nf_ct_tuple_src_equal(t1, t2) && nf_ct_tuple_dst_equal(t1, t2); 160 return __nf_ct_tuple_src_equal(t1, t2) &&
161 __nf_ct_tuple_dst_equal(t1, t2);
163} 162}
164 163
165static inline int nf_ct_tuple_mask_equal(const struct nf_conntrack_tuple_mask *m1, 164static inline int nf_ct_tuple_mask_equal(const struct nf_conntrack_tuple_mask *m1,
@@ -199,7 +198,7 @@ static inline int nf_ct_tuple_mask_cmp(const struct nf_conntrack_tuple *t,
199 const struct nf_conntrack_tuple_mask *mask) 198 const struct nf_conntrack_tuple_mask *mask)
200{ 199{
201 return nf_ct_tuple_src_mask_cmp(t, tuple, mask) && 200 return nf_ct_tuple_src_mask_cmp(t, tuple, mask) &&
202 nf_ct_tuple_dst_equal(t, tuple); 201 __nf_ct_tuple_dst_equal(t, tuple);
203} 202}
204 203
205#endif /* _NF_CONNTRACK_TUPLE_H */ 204#endif /* _NF_CONNTRACK_TUPLE_H */