Skip to content

Commit 56d1ac3

Browse files
Florian Westphaldavem330
authored andcommitted
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>
1 parent 6362a6a commit 56d1ac3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎drivers/net/netdevsim/ipsec.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,18 +227,19 @@ static const struct xfrmdev_ops nsim_xfrmdev_ops = {
227227

228228
bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb)
229229
{
230+
struct sec_path *sp = skb_sec_path(skb);
230231
struct nsim_ipsec *ipsec = &ns->ipsec;
231232
struct xfrm_state *xs;
232233
struct nsim_sa *tsa;
233234
u32 sa_idx;
234235

235236
/* do we even need to check this packet? */
236-
if (!skb->sp)
237+
if (!sp)
237238
return true;
238239

239-
if (unlikely(!skb->sp->len)) {
240+
if (unlikely(!sp->len)) {
240241
netdev_err(ns->netdev, "no xfrm state len = %d\n",
241-
skb->sp->len);
242+
sp->len);
242243
return false;
243244
}
244245

0 commit comments

Comments
 (0)