aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 700a19e0455e..5cf1a7377407 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -435,6 +435,10 @@ static inline void in6_ifa_hold(struct inet6_ifaddr *ifp)
refcount_inc(&ifp->refcnt);
}
+static inline bool in6_ifa_hold_safe(struct inet6_ifaddr *ifp)
+{
+ return refcount_inc_not_zero(&ifp->refcnt);
+}
/*
* compute link-local solicited-node multicast address