From: Steffen Klassert
Date: Tue, 7 Feb 2017 10:14:07 +0100
> +int secpath_set(struct sk_buff *skb)
> +{
> + struct sec_path *sp;
> +
> + /* Allocate new secpath or COW existing one. */
> + if (!skb->sp || atomic_read(&skb->sp->refcnt) != 1) {
> +
> + sp = secpath_dup(skb-
Add a new helper to set the secpath to the skb.
This avoids code duplication, as this is used
in multiple places.
Signed-off-by: Steffen Klassert
---
include/net/xfrm.h | 1 +
net/ipv6/xfrm6_input.c | 15 +++
net/xfrm/xfrm_input.c | 35 +++
3 fil