xfrm: change secpath_set to return secpath struct, not error value
It can only return 0 (success) or -ENOMEM. Change return value to a pointer to secpath struct. This avoids direct access to skb->sp: err = secpath_set(skb); if (!err) .. skb->sp-> ... Becomes: sp = secpath_set(skb) if (!sp) .. sp-> .. This reduces noise in followup patch which is going to remove skb->sp. Signed-off-by:Florian Westphal <fw@strlen.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/xfrm.h 1 addition, 1 deletioninclude/net/xfrm.h
- net/ipv4/esp4_offload.c 6 additions, 5 deletionsnet/ipv4/esp4_offload.c
- net/ipv6/esp6_offload.c 6 additions, 5 deletionsnet/ipv6/esp6_offload.c
- net/ipv6/xfrm6_input.c 4 additions, 2 deletionsnet/ipv6/xfrm6_input.c
- net/xfrm/xfrm_input.c 9 additions, 7 deletionsnet/xfrm/xfrm_input.c
Loading
Please register or sign in to comment