summaryrefslogtreecommitdiff
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorYajun Deng <yajun.deng@linux.dev>2021-11-23 10:54:30 +0800
committerDavid S. Miller <davem@davemloft.net>2021-11-23 11:51:37 +0000
commit1e84dc6b7bbfc4d1dd846decece4611b7e035772 (patch)
tree08827418ecf758dd90a2f8cf6b0515e5bf0f07ec /include/net/sock.h
parenta0c2ccd9b5ad0a9e838158404e041b5a8ff762dd (diff)
downloadlwn-1e84dc6b7bbfc4d1dd846decece4611b7e035772.tar.gz
lwn-1e84dc6b7bbfc4d1dd846decece4611b7e035772.zip
neigh: introduce neigh_confirm() helper function
Add neigh_confirm() for the confirmed member in struct neighbour, it can be called as an independent unit by other functions. Signed-off-by: Yajun Deng <yajun.deng@linux.dev> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index a79fc772324e..e7c231373875 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2135,13 +2135,10 @@ static inline void sock_confirm_neigh(struct sk_buff *skb, struct neighbour *n)
{
if (skb_get_dst_pending_confirm(skb)) {
struct sock *sk = skb->sk;
- unsigned long now = jiffies;
- /* avoid dirtying neighbour */
- if (READ_ONCE(n->confirmed) != now)
- WRITE_ONCE(n->confirmed, now);
if (sk && READ_ONCE(sk->sk_dst_pending_confirm))
WRITE_ONCE(sk->sk_dst_pending_confirm, 0);
+ neigh_confirm(n);
}
}