diff options
author | Máté Eckl <ecklm94@gmail.com> | 2018-08-14 16:09:10 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-08-16 13:37:10 -0400 |
commit | 90d827f06bebbd9aded00c152e6c9eb2db4db1a3 (patch) | |
tree | 897cc5a0adef7267db800d019b47fee3ea8cdb34 | |
parent | cdb2f401246ef70b37eeedd9c6f9c28d611d8255 (diff) |
netfilter: nft_tproxy: Fix missing-braces warning
This patch fixes a warning reported by the kbuild test robot (from linux-next
tree):
net/netfilter/nft_tproxy.c: In function 'nft_tproxy_eval_v6':
>> net/netfilter/nft_tproxy.c:85:9: warning: missing braces around initializer [-Wmissing-braces]
struct in6_addr taddr = {0};
^
net/netfilter/nft_tproxy.c:85:9: warning: (near initialization for 'taddr.in6_u') [-Wmissing-braces]
This warning is actually caused by a gcc bug already resolved in newer
versions (kbuild used 4.9) so this kind of initialization is omitted and
memset is used instead.
Fixes: 4ed8eb6570a4 ("netfilter: nf_tables: Add native tproxy support")
Signed-off-by: Máté Eckl <ecklm94@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/nft_tproxy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/netfilter/nft_tproxy.c b/net/netfilter/nft_tproxy.c index eff99dffc842..f92a82c73880 100644 --- a/net/netfilter/nft_tproxy.c +++ b/net/netfilter/nft_tproxy.c | |||
@@ -82,13 +82,15 @@ static void nft_tproxy_eval_v6(const struct nft_expr *expr, | |||
82 | const struct nft_tproxy *priv = nft_expr_priv(expr); | 82 | const struct nft_tproxy *priv = nft_expr_priv(expr); |
83 | struct sk_buff *skb = pkt->skb; | 83 | struct sk_buff *skb = pkt->skb; |
84 | const struct ipv6hdr *iph = ipv6_hdr(skb); | 84 | const struct ipv6hdr *iph = ipv6_hdr(skb); |
85 | struct in6_addr taddr = {0}; | 85 | struct in6_addr taddr; |
86 | int thoff = pkt->xt.thoff; | 86 | int thoff = pkt->xt.thoff; |
87 | struct udphdr _hdr, *hp; | 87 | struct udphdr _hdr, *hp; |
88 | __be16 tport = 0; | 88 | __be16 tport = 0; |
89 | struct sock *sk; | 89 | struct sock *sk; |
90 | int l4proto; | 90 | int l4proto; |
91 | 91 | ||
92 | memset(&taddr, 0, sizeof(taddr)); | ||
93 | |||
92 | if (!pkt->tprot_set) { | 94 | if (!pkt->tprot_set) { |
93 | regs->verdict.code = NFT_BREAK; | 95 | regs->verdict.code = NFT_BREAK; |
94 | return; | 96 | return; |