summaryrefslogtreecommitdiffstats
path: root/include/net/dst.h
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2017-02-06 22:14:15 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-07 19:07:46 +0100
commit63fca65d08632fbec9d9b655f671cf08aa1aeeb8 (patch)
tree103ac18cddcdf911a8589f52fbcefb7140411a51 /include/net/dst.h
parenttcp: replace dst_confirm with sk_dst_confirm (diff)
downloadlinux-63fca65d08632fbec9d9b655f671cf08aa1aeeb8.tar.xz
linux-63fca65d08632fbec9d9b655f671cf08aa1aeeb8.zip
net: add confirm_neigh method to dst_ops
Add confirm_neigh method to dst_ops and use it from IPv4 and IPv6 to lookup and confirm the neighbour. Its usage via the new helper dst_confirm_neigh() should be restricted to MSG_PROBE users for performance reasons. For XFRM prefer the last tunnel address, if present. With help from Steffen Klassert. Signed-off-by: Julian Anastasov <ja@ssi.bg> Acked-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dst.h')
-rw-r--r--include/net/dst.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/dst.h b/include/net/dst.h
index 6835d224d47b..3a3b34b83b00 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -477,6 +477,13 @@ static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst
return IS_ERR(n) ? NULL : n;
}
+static inline void dst_confirm_neigh(const struct dst_entry *dst,
+ const void *daddr)
+{
+ if (dst->ops->confirm_neigh)
+ dst->ops->confirm_neigh(dst, daddr);
+}
+
static inline void dst_link_failure(struct sk_buff *skb)
{
struct dst_entry *dst = skb_dst(skb);