diff options
author | Florian Westphal <fw@strlen.de> | 2018-09-12 15:19:09 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-09-20 18:02:22 +0200 |
commit | 83d213fd9d1a56108584cd812333462caa39a747 (patch) | |
tree | 09dc6446cc341d9ba55e160e2e3cd696738f0302 /net/netfilter/nf_conntrack_proto_icmpv6.c | |
parent | 9976fc6e6edbb0372f084a2ae8c1b8103b3bff1d (diff) | |
download | linux-stable-83d213fd9d1a56108584cd812333462caa39a747.tar.gz linux-stable-83d213fd9d1a56108584cd812333462caa39a747.tar.bz2 linux-stable-83d213fd9d1a56108584cd812333462caa39a747.zip |
netfilter: conntrack: deconstify packet callback skb pointer
Only two protocols need the ->error() function: icmp and icmpv6.
This is because icmp error mssages might be RELATED to an existing
connection (e.g. PMTUD, port unreachable and the like), and their
->error() handlers do this.
The error callback is already optional, so remove it for
udp and call them from ->packet() instead.
As the error() callback can call checksum functions that write to
skb->csum*, the const qualifier has to be removed as well.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_conntrack_proto_icmpv6.c')
-rw-r--r-- | net/netfilter/nf_conntrack_proto_icmpv6.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_proto_icmpv6.c b/net/netfilter/nf_conntrack_proto_icmpv6.c index bb94363818e6..a1933566d53d 100644 --- a/net/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/netfilter/nf_conntrack_proto_icmpv6.c @@ -92,10 +92,10 @@ static unsigned int *icmpv6_get_timeouts(struct net *net) /* Returns verdict for packet, or -1 for invalid. */ static int icmpv6_packet(struct nf_conn *ct, - const struct sk_buff *skb, - unsigned int dataoff, - enum ip_conntrack_info ctinfo, - const struct nf_hook_state *state) + struct sk_buff *skb, + unsigned int dataoff, + enum ip_conntrack_info ctinfo, + const struct nf_hook_state *state) { unsigned int *timeout = nf_ct_timeout_lookup(ct); static const u8 valid_new[] = { |