aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-19 08:21:11 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2018-09-20 12:40:32 -0400
commit346fa83d10934cf206e2fd0f514bf8ce186f08fe (patch)
tree6534e551289e45dea494d29977e1ffbf1507585a
parentbab4344975fe2c719eda32de59298d6de26fe126 (diff)
netfilter: conntrack: get rid of double sizeof
sizeof(sizeof()) is quite strange and does not seem to be what is wanted here. The issue is detected with the help of Coccinelle. Fixes: 39215846740a ("netfilter: conntrack: remove nlattr_size pointer from l4proto trackers") Signed-off-by: zhong jiang <zhongjiang@huawei.com> Acked-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index b4bdf9eda7b7..247b89784a6f 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -1213,8 +1213,8 @@ static const struct nla_policy tcp_nla_policy[CTA_PROTOINFO_TCP_MAX+1] = {
1213#define TCP_NLATTR_SIZE ( \ 1213#define TCP_NLATTR_SIZE ( \
1214 NLA_ALIGN(NLA_HDRLEN + 1) + \ 1214 NLA_ALIGN(NLA_HDRLEN + 1) + \
1215 NLA_ALIGN(NLA_HDRLEN + 1) + \ 1215 NLA_ALIGN(NLA_HDRLEN + 1) + \
1216 NLA_ALIGN(NLA_HDRLEN + sizeof(sizeof(struct nf_ct_tcp_flags))) + \ 1216 NLA_ALIGN(NLA_HDRLEN + sizeof(struct nf_ct_tcp_flags)) + \
1217 NLA_ALIGN(NLA_HDRLEN + sizeof(sizeof(struct nf_ct_tcp_flags)))) 1217 NLA_ALIGN(NLA_HDRLEN + sizeof(struct nf_ct_tcp_flags)))
1218 1218
1219static int nlattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct) 1219static int nlattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct)
1220{ 1220{