summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_tables_ipv6.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-09-09 12:42:50 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-09-12 18:52:04 +0200
commit8df9e32e7ed2978f90cce780ce6a27513044158a (patch)
treea000621057334f156d2710300117ab9eb994f262 /include/net/netfilter/nf_tables_ipv6.h
parentbeac5afa2d78605b70f40cf5ab5601ab10659c7f (diff)
netfilter: nf_tables_ipv6: setup pktinfo transport field on failure to parse
Make sure the pktinfo protocol fields are initialized if this fails to parse the transport header. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_tables_ipv6.h')
-rw-r--r--include/net/netfilter/nf_tables_ipv6.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/netfilter/nf_tables_ipv6.h b/include/net/netfilter/nf_tables_ipv6.h
index 6aeee47b1b5e..1e0ffd5aea47 100644
--- a/include/net/netfilter/nf_tables_ipv6.h
+++ b/include/net/netfilter/nf_tables_ipv6.h
@@ -15,9 +15,10 @@ nft_set_pktinfo_ipv6(struct nft_pktinfo *pkt,
nft_set_pktinfo(pkt, skb, state);
protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, NULL);
- /* If malformed, drop it */
- if (protohdr < 0)
+ if (protohdr < 0) {
+ nft_set_pktinfo_proto_unspec(pkt, skb);
return -1;
+ }
pkt->tprot_set = true;
pkt->tprot = protohdr;