]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/net/arp.h
net: add confirm_neigh method to dst_ops
[mirror_ubuntu-zesty-kernel.git] / include / net / arp.h
index 5e0f891d476c299d91fde14ce9cdeedc9a7e26c6..65619a2de6f44178d037823c3ad30c0f83f12456 100644 (file)
@@ -35,6 +35,22 @@ static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32
        return n;
 }
 
+static inline void __ipv4_confirm_neigh(struct net_device *dev, u32 key)
+{
+       struct neighbour *n;
+
+       rcu_read_lock_bh();
+       n = __ipv4_neigh_lookup_noref(dev, key);
+       if (n) {
+               unsigned long now = jiffies;
+
+               /* avoid dirtying neighbour */
+               if (n->confirmed != now)
+                       n->confirmed = now;
+       }
+       rcu_read_unlock_bh();
+}
+
 void arp_init(void);
 int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
 void arp_send(int type, int ptype, __be32 dest_ip,