Commit 56d1ac32 authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

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: default avatarShannon Nelson <shannon.lee.nelson@gmail.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6362a6a0
...@@ -227,18 +227,19 @@ static const struct xfrmdev_ops nsim_xfrmdev_ops = { ...@@ -227,18 +227,19 @@ static const struct xfrmdev_ops nsim_xfrmdev_ops = {
bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb) 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 nsim_ipsec *ipsec = &ns->ipsec;
struct xfrm_state *xs; struct xfrm_state *xs;
struct nsim_sa *tsa; struct nsim_sa *tsa;
u32 sa_idx; u32 sa_idx;
/* do we even need to check this packet? */ /* do we even need to check this packet? */
if (!skb->sp) if (!sp)
return true; return true;
if (unlikely(!skb->sp->len)) { if (unlikely(!sp->len)) {
netdev_err(ns->netdev, "no xfrm state len = %d\n", netdev_err(ns->netdev, "no xfrm state len = %d\n",
skb->sp->len); sp->len);
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment