diff options
author | Florian Westphal <fw@strlen.de> | 2015-03-09 18:04:15 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-03-10 10:01:32 -0400 |
commit | a03a8dbe20eff6d57aae3147577bf84b52aba4e6 (patch) | |
tree | 3460950cb98879361087e392078c0dfd4dba9912 /net/ipv6 | |
parent | 8ac467e837a24eb024177b4b01013d8e6764913a (diff) |
netfilter: fix sparse warnings in reject handling
make C=1 CF=-D__CHECK_ENDIAN__ shows following:
net/bridge/netfilter/nft_reject_bridge.c:65:50: warning: incorrect type in argument 3 (different base types)
net/bridge/netfilter/nft_reject_bridge.c:65:50: expected restricted __be16 [usertype] protocol [..]
net/bridge/netfilter/nft_reject_bridge.c:102:37: warning: cast from restricted __be16
net/bridge/netfilter/nft_reject_bridge.c:102:37: warning: incorrect type in argument 1 (different base types) [..]
net/bridge/netfilter/nft_reject_bridge.c:121:50: warning: incorrect type in argument 3 (different base types) [..]
net/bridge/netfilter/nft_reject_bridge.c:168:52: warning: incorrect type in argument 3 (different base types) [..]
net/bridge/netfilter/nft_reject_bridge.c:233:52: warning: incorrect type in argument 3 (different base types) [..]
Caused by two (harmless) errors:
1. htons() instead of ntohs()
2. __be16 for protocol in nf_reject_ipXhdr_put API, use u8 instead.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/nf_reject_ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/nf_reject_ipv6.c b/net/ipv6/netfilter/nf_reject_ipv6.c index 68e0bb4db1bf..3afdce03d94e 100644 --- a/net/ipv6/netfilter/nf_reject_ipv6.c +++ b/net/ipv6/netfilter/nf_reject_ipv6.c | |||
@@ -65,7 +65,7 @@ EXPORT_SYMBOL_GPL(nf_reject_ip6_tcphdr_get); | |||
65 | 65 | ||
66 | struct ipv6hdr *nf_reject_ip6hdr_put(struct sk_buff *nskb, | 66 | struct ipv6hdr *nf_reject_ip6hdr_put(struct sk_buff *nskb, |
67 | const struct sk_buff *oldskb, | 67 | const struct sk_buff *oldskb, |
68 | __be16 protocol, int hoplimit) | 68 | __u8 protocol, int hoplimit) |
69 | { | 69 | { |
70 | struct ipv6hdr *ip6h; | 70 | struct ipv6hdr *ip6h; |
71 | const struct ipv6hdr *oip6h = ipv6_hdr(oldskb); | 71 | const struct ipv6hdr *oip6h = ipv6_hdr(oldskb); |