diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2021-03-10 03:38:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-30 15:32:05 +0300 |
commit | 0a245acbce8991668d5406f128f2c06a310c99a1 (patch) | |
tree | 5644816705d5b1d989bf20072169fa6cbba3e287 /include/net | |
parent | 33cd5f88b5bf01135e06d5d77aa6a59d899ce993 (diff) | |
download | linux-0a245acbce8991668d5406f128f2c06a310c99a1.tar.xz |
net: Consolidate common blackhole dst ops
[ Upstream commit c4c877b2732466b4c63217baad05c96f775912c7 ]
Move generic blackhole dst ops to the core and use them from both
ipv4_dst_blackhole_ops and ip6_dst_blackhole_ops where possible. No
functional change otherwise. We need these also in other locations
and having to define them over and over again is not great.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/dst.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 8ea8812b0b41..acd15c544cf3 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -535,4 +535,15 @@ static inline void skb_dst_update_pmtu_no_confirm(struct sk_buff *skb, u32 mtu) dst->ops->update_pmtu(dst, NULL, skb, mtu, false); } +struct dst_entry *dst_blackhole_check(struct dst_entry *dst, u32 cookie); +void dst_blackhole_update_pmtu(struct dst_entry *dst, struct sock *sk, + struct sk_buff *skb, u32 mtu, bool confirm_neigh); +void dst_blackhole_redirect(struct dst_entry *dst, struct sock *sk, + struct sk_buff *skb); +u32 *dst_blackhole_cow_metrics(struct dst_entry *dst, unsigned long old); +struct neighbour *dst_blackhole_neigh_lookup(const struct dst_entry *dst, + struct sk_buff *skb, + const void *daddr); +unsigned int dst_blackhole_mtu(const struct dst_entry *dst); + #endif /* _NET_DST_H */ |