net: Create and use new helper xfrm_dst_child().
Only IPSEC routes have a non-NULL dst->child pointer. And IPSEC routes are identified by a non-NULL dst->xfrm pointer. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
071fb37ec4
commit
b92cf4aab8
@@ -994,6 +994,15 @@ struct xfrm_dst {
|
||||
u32 path_cookie;
|
||||
};
|
||||
|
||||
static inline struct dst_entry *xfrm_dst_child(const struct dst_entry *dst)
|
||||
{
|
||||
#ifdef CONFIG_XFRM
|
||||
if (dst->xfrm)
|
||||
return dst->child;
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XFRM
|
||||
static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
|
||||
{
|
||||
|
Reference in New Issue
Block a user