]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/net/ndisc.h
net: add confirm_neigh method to dst_ops
[mirror_ubuntu-zesty-kernel.git] / include / net / ndisc.h
index d562a2fe48604b278b08834af5c60f14c7405711..8a0214654b6b10bc480d7e6dc8195555ca58dc9a 100644 (file)
@@ -391,6 +391,23 @@ static inline struct neighbour *__ipv6_neigh_lookup(struct net_device *dev, cons
        return n;
 }
 
+static inline void __ipv6_confirm_neigh(struct net_device *dev,
+                                       const void *pkey)
+{
+       struct neighbour *n;
+
+       rcu_read_lock_bh();
+       n = __ipv6_neigh_lookup_noref(dev, pkey);
+       if (n) {
+               unsigned long now = jiffies;
+
+               /* avoid dirtying neighbour */
+               if (n->confirmed != now)
+                       n->confirmed = now;
+       }
+       rcu_read_unlock_bh();
+}
+
 int ndisc_init(void);
 int ndisc_late_init(void);