]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
xfrm: Always set XFRM_TRANSFORMED in xfrm{4,6}_output_finish
authorDavid Ahern <dsahern@gmail.com>
Mon, 20 Apr 2020 23:13:51 +0000 (17:13 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2020 19:32:11 +0000 (12:32 -0700)
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 <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/xfrm4_output.c
net/ipv6/xfrm6_output.c

index 89ba7c87de5df35d8a3807f360fd9d3845fcfa20..30ddb9dc9398beaf8aa7da1a90409c5c2e76d9b6 100644 (file)
@@ -58,9 +58,7 @@ int xfrm4_output_finish(struct sock *sk, struct sk_buff *skb)
 {
        memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
 
-#ifdef CONFIG_NETFILTER
        IPCB(skb)->flags |= IPSKB_XFRM_TRANSFORMED;
-#endif
 
        return xfrm_output(sk, skb);
 }
index fbe51d40bd7e9f8b50bc3ba1c1d41710a162e29d..e34167f790e6795830ebe94b2872f5be4c6740a7 100644 (file)
@@ -111,9 +111,7 @@ int xfrm6_output_finish(struct sock *sk, struct sk_buff *skb)
 {
        memset(IP6CB(skb), 0, sizeof(*IP6CB(skb)));
 
-#ifdef CONFIG_NETFILTER
        IP6CB(skb)->flags |= IP6SKB_XFRM_TRANSFORMED;
-#endif
 
        return xfrm_output(sk, skb);
 }