ndisc.h (448cc2fb3a7b327823a9afd374808c37b8e6194f) | ndisc.h (1e84dc6b7bbfc4d1dd846decece4611b7e035772) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _NDISC_H 3#define _NDISC_H 4 5#include <net/ipv6_stubs.h> 6 7/* 8 * ICMP codes for neighbour discovery messages --- 397 unchanged lines hidden (view full) --- 406 407static inline void __ipv6_confirm_neigh(struct net_device *dev, 408 const void *pkey) 409{ 410 struct neighbour *n; 411 412 rcu_read_lock_bh(); 413 n = __ipv6_neigh_lookup_noref(dev, pkey); | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _NDISC_H 3#define _NDISC_H 4 5#include <net/ipv6_stubs.h> 6 7/* 8 * ICMP codes for neighbour discovery messages --- 397 unchanged lines hidden (view full) --- 406 407static inline void __ipv6_confirm_neigh(struct net_device *dev, 408 const void *pkey) 409{ 410 struct neighbour *n; 411 412 rcu_read_lock_bh(); 413 n = __ipv6_neigh_lookup_noref(dev, pkey); |
414 if (n) { 415 unsigned long now = jiffies; 416 417 /* avoid dirtying neighbour */ 418 if (READ_ONCE(n->confirmed) != now) 419 WRITE_ONCE(n->confirmed, now); 420 } | 414 neigh_confirm(n); |
421 rcu_read_unlock_bh(); 422} 423 424static inline void __ipv6_confirm_neigh_stub(struct net_device *dev, 425 const void *pkey) 426{ 427 struct neighbour *n; 428 429 rcu_read_lock_bh(); 430 n = __ipv6_neigh_lookup_noref_stub(dev, pkey); | 415 rcu_read_unlock_bh(); 416} 417 418static inline void __ipv6_confirm_neigh_stub(struct net_device *dev, 419 const void *pkey) 420{ 421 struct neighbour *n; 422 423 rcu_read_lock_bh(); 424 n = __ipv6_neigh_lookup_noref_stub(dev, pkey); |
431 if (n) { 432 unsigned long now = jiffies; 433 434 /* avoid dirtying neighbour */ 435 if (READ_ONCE(n->confirmed) != now) 436 WRITE_ONCE(n->confirmed, now); 437 } | 425 neigh_confirm(n); |
438 rcu_read_unlock_bh(); 439} 440 441/* uses ipv6_stub and is meant for use outside of IPv6 core */ 442static inline struct neighbour *ip_neigh_gw6(struct net_device *dev, 443 const void *addr) 444{ 445 struct neighbour *neigh; --- 60 unchanged lines hidden --- | 426 rcu_read_unlock_bh(); 427} 428 429/* uses ipv6_stub and is meant for use outside of IPv6 core */ 430static inline struct neighbour *ip_neigh_gw6(struct net_device *dev, 431 const void *addr) 432{ 433 struct neighbour *neigh; --- 60 unchanged lines hidden --- |