diff options
author | 2022-04-13 16:15:58 +0800 | |
---|---|---|
committer | 2022-04-13 13:09:57 +0100 | |
commit | 7d9dbdfbfdc5e52131bea94a7318ee35b15a5f19 (patch) | |
tree | b209c774d48b131bd61a64559f7bfa6908286a1d /net/sched/cls_api.c | |
parent | net: ipv6: remove redundant statistics in ipv6_hop_jumbo() (diff) | |
download | wireguard-linux-7d9dbdfbfdc5e52131bea94a7318ee35b15a5f19.tar.xz wireguard-linux-7d9dbdfbfdc5e52131bea94a7318ee35b15a5f19.zip |
net: ipv6: add skb drop reasons to TLV parse
Replace kfree_skb() used in TLV encoded option header parsing with
kfree_skb_reason(). Following functions are involved:
ip6_parse_tlv()
ipv6_hop_ra()
ipv6_hop_ioam()
ipv6_hop_jumbo()
ipv6_hop_calipso()
ipv6_dest_hao()
Most skb drops during this process are regarded as 'InHdrErrors',
as 'IPSTATS_MIB_INHDRERRORS' is used when ip6_parse_tlv() fails,
which make we use 'SKB_DROP_REASON_IP_INHDR' correspondingly.
However, 'IP_INHDR' is a relatively general reason. Therefore, we
can use other reasons with higher priority in some cases. For example,
'SKB_DROP_REASON_UNHANDLED_PROTO' is used for unknown TLV options.
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Reviewed-by: Jiang Biao <benbjiang@tencent.com>
Reviewed-by: Hao Peng <flyingpeng@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
0 files changed, 0 insertions, 0 deletions