net: icmp: introduce function icmpv6_param_prob_reason()
In order to add the skb drop reasons support to icmpv6_param_prob(), introduce the function icmpv6_param_prob_reason() and make icmpv6_param_prob() an inline call to it. This new function will be used in the following patches. 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>
This commit is contained in:
committed by
David S. Miller
parent
2edc1a383f
commit
1ad6d548e2
@@ -79,8 +79,9 @@ extern int icmpv6_init(void);
|
||||
extern int icmpv6_err_convert(u8 type, u8 code,
|
||||
int *err);
|
||||
extern void icmpv6_cleanup(void);
|
||||
extern void icmpv6_param_prob(struct sk_buff *skb,
|
||||
u8 code, int pos);
|
||||
extern void icmpv6_param_prob_reason(struct sk_buff *skb,
|
||||
u8 code, int pos,
|
||||
enum skb_drop_reason reason);
|
||||
|
||||
struct flowi6;
|
||||
struct in6_addr;
|
||||
@@ -91,6 +92,12 @@ extern void icmpv6_flow_init(struct sock *sk,
|
||||
const struct in6_addr *daddr,
|
||||
int oif);
|
||||
|
||||
static inline void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos)
|
||||
{
|
||||
icmpv6_param_prob_reason(skb, code, pos,
|
||||
SKB_DROP_REASON_NOT_SPECIFIED);
|
||||
}
|
||||
|
||||
static inline bool icmpv6_is_err(int type)
|
||||
{
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user