arp.h (c95baf12f5077419db01313ab61c2aac007d40cd) | arp.h (1e84dc6b7bbfc4d1dd846decece4611b7e035772) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* linux/net/inet/arp.h */ 3#ifndef _ARP_H 4#define _ARP_H 5 6#include <linux/if_arp.h> 7#include <linux/hash.h> 8#include <net/neighbour.h> --- 39 unchanged lines hidden (view full) --- 48} 49 50static inline void __ipv4_confirm_neigh(struct net_device *dev, u32 key) 51{ 52 struct neighbour *n; 53 54 rcu_read_lock_bh(); 55 n = __ipv4_neigh_lookup_noref(dev, key); | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* linux/net/inet/arp.h */ 3#ifndef _ARP_H 4#define _ARP_H 5 6#include <linux/if_arp.h> 7#include <linux/hash.h> 8#include <net/neighbour.h> --- 39 unchanged lines hidden (view full) --- 48} 49 50static inline void __ipv4_confirm_neigh(struct net_device *dev, u32 key) 51{ 52 struct neighbour *n; 53 54 rcu_read_lock_bh(); 55 n = __ipv4_neigh_lookup_noref(dev, key); |
56 if (n) { 57 unsigned long now = jiffies; 58 59 /* avoid dirtying neighbour */ 60 if (READ_ONCE(n->confirmed) != now) 61 WRITE_ONCE(n->confirmed, now); 62 } | 56 neigh_confirm(n); |
63 rcu_read_unlock_bh(); 64} 65 66void arp_init(void); 67int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg); 68void arp_send(int type, int ptype, __be32 dest_ip, 69 struct net_device *dev, __be32 src_ip, 70 const unsigned char *dest_hw, --- 12 unchanged lines hidden --- | 57 rcu_read_unlock_bh(); 58} 59 60void arp_init(void); 61int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg); 62void arp_send(int type, int ptype, __be32 dest_ip, 63 struct net_device *dev, __be32 src_ip, 64 const unsigned char *dest_hw, --- 12 unchanged lines hidden --- |