summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-12-18 17:15:23 +0100
committerDavid S. Miller <davem@davemloft.net>2018-12-19 11:21:37 -0800
commit56d1ac3260dadfc66c81ef2689bd1a09b05731a2 (patch)
treeb78dcf253ad08d18da3af4167d97b414e957685c
parent6362a6a04031cacc8ff54b65b84385d9fbab853d (diff)
downloadlinux-56d1ac3260dadfc66c81ef2689bd1a09b05731a2.tar.gz
linux-56d1ac3260dadfc66c81ef2689bd1a09b05731a2.tar.bz2
linux-56d1ac3260dadfc66c81ef2689bd1a09b05731a2.zip
drivers: net: netdevsim: use skb_sec_path helper
... so this won't have to be changed when skb->sp goes away. v2: no changes, preserve ack. Acked-by: Shannon Nelson <shannon.lee.nelson@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/netdevsim/ipsec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/netdevsim/ipsec.c b/drivers/net/netdevsim/ipsec.c
index 2dcf6cc269d0..76e11d889bb6 100644
--- a/drivers/net/netdevsim/ipsec.c
+++ b/drivers/net/netdevsim/ipsec.c
@@ -227,18 +227,19 @@ static const struct xfrmdev_ops nsim_xfrmdev_ops = {
bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb)
{
+ struct sec_path *sp = skb_sec_path(skb);
struct nsim_ipsec *ipsec = &ns->ipsec;
struct xfrm_state *xs;
struct nsim_sa *tsa;
u32 sa_idx;
/* do we even need to check this packet? */
- if (!skb->sp)
+ if (!sp)
return true;
- if (unlikely(!skb->sp->len)) {
+ if (unlikely(!sp->len)) {
netdev_err(ns->netdev, "no xfrm state len = %d\n",
- skb->sp->len);
+ sp->len);
return false;
}