Skip to content

Commit 0c922a4

Browse files
dsaherndavem330
authored andcommitted
xfrm: Always set XFRM_TRANSFORMED in xfrm{4,6}_output_finish
IPSKB_XFRM_TRANSFORMED and IP6SKB_XFRM_TRANSFORMED are skb flags set by xfrm code to tell other skb handlers that the packet has been passed through the xfrm output functions. Simplify the code and just always set them rather than conditionally based on netfilter enabled thus making the flag available for other users. Signed-off-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9175d3f commit 0c922a4

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

net/ipv4/xfrm4_output.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ int xfrm4_output_finish(struct sock *sk, struct sk_buff *skb)
5858
{
5959
memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
6060

61-
#ifdef CONFIG_NETFILTER
6261
IPCB(skb)->flags |= IPSKB_XFRM_TRANSFORMED;
63-
#endif
6462

6563
return xfrm_output(sk, skb);
6664
}

net/ipv6/xfrm6_output.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ int xfrm6_output_finish(struct sock *sk, struct sk_buff *skb)
111111
{
112112
memset(IP6CB(skb), 0, sizeof(*IP6CB(skb)));
113113

114-
#ifdef CONFIG_NETFILTER
115114
IP6CB(skb)->flags |= IP6SKB_XFRM_TRANSFORMED;
116-
#endif
117115

118116
return xfrm_output(sk, skb);
119117
}

0 commit comments

Comments
 (0)