aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_rt.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-08-21 16:19:26 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-08-28 17:42:56 +0200
commit5fd02ebe6537a7567f060ed36fb0dda64c5b63d8 (patch)
tree72eed63f9876228e73ef3a2dfe13f44025541d7b /net/netfilter/nft_rt.c
parentnetfilter: ebtables: fix indent on if statements (diff)
downloadlinux-dev-5fd02ebe6537a7567f060ed36fb0dda64c5b63d8.tar.xz
linux-dev-5fd02ebe6537a7567f060ed36fb0dda64c5b63d8.zip
netfilter: fix a few (harmless) sparse warnings
net/netfilter/nft_payload.c:187:18: warning: incorrect type in return expression (expected bool got restricted __sum16 [usertype] check) net/netfilter/nft_exthdr.c:222:14: warning: cast to restricted __be32 net/netfilter/nft_rt.c:49:23: warning: incorrect type in assignment (different base types expected unsigned int got restricted __be32) net/netfilter/nft_rt.c:70:25: warning: symbol 'nft_rt_policy' was not declared. Should it be static? Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_rt.c')
-rw-r--r--net/netfilter/nft_rt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/nft_rt.c b/net/netfilter/nft_rt.c
index e142e65d3176..61fd3acaa3c9 100644
--- a/net/netfilter/nft_rt.c
+++ b/net/netfilter/nft_rt.c
@@ -82,8 +82,8 @@ static void nft_rt_get_eval(const struct nft_expr *expr,
if (nft_pf(pkt) != NFPROTO_IPV4)
goto err;
- *dest = rt_nexthop((const struct rtable *)dst,
- ip_hdr(skb)->daddr);
+ *dest = (__force u32)rt_nexthop((const struct rtable *)dst,
+ ip_hdr(skb)->daddr);
break;
case NFT_RT_NEXTHOP6:
if (nft_pf(pkt) != NFPROTO_IPV6)
@@ -106,7 +106,7 @@ err:
regs->verdict.code = NFT_BREAK;
}
-const struct nla_policy nft_rt_policy[NFTA_RT_MAX + 1] = {
+static const struct nla_policy nft_rt_policy[NFTA_RT_MAX + 1] = {
[NFTA_RT_DREG] = { .type = NLA_U32 },
[NFTA_RT_KEY] = { .type = NLA_U32 },
};