1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lorenzo Colitti <lorenzo@google.com>
Date: Tue, 27 Oct 2020 23:15:13 +0900
Subject: ONHOLD: ANDROID: net: xfrm: always export
pktgen_xfrm_outer_mode_output
Currently, it is not possible to set CONFIG_NET_PKTGEN=m in a
vendor kernel, as it depends on pktgen_xfrm_outer_mode_output,
which is only exported if CONFIG_NET_PKTGEN is enabled.
Always export this symbol so vendor kernels can depend on it.
This may be simpler than the alternative, which is to set
CONFIG_NET_PKTGEN=m in the GKI kernel.
[CPNOTE: 20/07/21] Lee: Requested more info from the bug
[CPNOTE: 04/08/21] Lee: Set NET_PKTGEN=m in Android 'T' (android13)
Bug: 171693245
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Change-Id: I96b48c77121aea90fb4c4c51ecb97a92601bccf6
(cherry picked from commit 3ef1e249c624e1a7f28e1364d9b924d933826ee6)
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Lee Jones <joneslee@google.com>
---
include/net/xfrm.h | 2 --
net/xfrm/xfrm_output.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1664,9 +1664,7 @@ int xfrm_trans_queue(struct sk_buff *skb,
int xfrm_output_resume(struct sock *sk, struct sk_buff *skb, int err);
int xfrm_output(struct sock *sk, struct sk_buff *skb);
-#if IS_ENABLED(CONFIG_NET_PKTGEN)
int pktgen_xfrm_outer_mode_output(struct xfrm_state *x, struct sk_buff *skb);
-#endif
void xfrm_local_error(struct sk_buff *skb, int mtu);
int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi,
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -479,13 +479,11 @@ static int xfrm_outer_mode_output(struct xfrm_state *x, struct sk_buff *skb)
return -EOPNOTSUPP;
}
-#if IS_ENABLED(CONFIG_NET_PKTGEN)
int pktgen_xfrm_outer_mode_output(struct xfrm_state *x, struct sk_buff *skb)
{
return xfrm_outer_mode_output(x, skb);
}
EXPORT_SYMBOL_GPL(pktgen_xfrm_outer_mode_output);
-#endif
static int xfrm_output_one(struct sk_buff *skb, int err)
{
|