Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Florian Westphal and committed by
David S. Miller
56d1ac32 6362a6a0

+4 -3
+4 -3
drivers/net/netdevsim/ipsec.c
··· 227 227 228 228 bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb) 229 229 { 230 + struct sec_path *sp = skb_sec_path(skb); 230 231 struct nsim_ipsec *ipsec = &ns->ipsec; 231 232 struct xfrm_state *xs; 232 233 struct nsim_sa *tsa; 233 234 u32 sa_idx; 234 235 235 236 /* do we even need to check this packet? */ 236 - if (!skb->sp) 237 + if (!sp) 237 238 return true; 238 239 239 - if (unlikely(!skb->sp->len)) { 240 + if (unlikely(!sp->len)) { 240 241 netdev_err(ns->netdev, "no xfrm state len = %d\n", 241 - skb->sp->len); 242 + sp->len); 242 243 return false; 243 244 } 244 245