diff options
author | Florian Westphal <fw@strlen.de> | 2019-05-03 11:46:14 -0400 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2019-06-05 07:16:30 -0400 |
commit | bac9593515c653e9ec05df9e303cdf1b969854d4 (patch) | |
tree | 5ec429f0c1ffe0f12284df0d144513d71e5ace28 /net/ipv4 | |
parent | 2a99283cb7c1ef1bc61770a2a20ef88693687443 (diff) |
xfrm: remove init_tempsel indirection from xfrm_state_afinfo
Simple initialization, handle it in the caller.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/xfrm4_state.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c index 80c40b4981bb..da0fd9556d57 100644 --- a/net/ipv4/xfrm4_state.c +++ b/net/ipv4/xfrm4_state.c | |||
@@ -23,24 +23,6 @@ static int xfrm4_init_flags(struct xfrm_state *x) | |||
23 | } | 23 | } |
24 | 24 | ||
25 | static void | 25 | static void |
26 | __xfrm4_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl) | ||
27 | { | ||
28 | const struct flowi4 *fl4 = &fl->u.ip4; | ||
29 | |||
30 | sel->daddr.a4 = fl4->daddr; | ||
31 | sel->saddr.a4 = fl4->saddr; | ||
32 | sel->dport = xfrm_flowi_dport(fl, &fl4->uli); | ||
33 | sel->dport_mask = htons(0xffff); | ||
34 | sel->sport = xfrm_flowi_sport(fl, &fl4->uli); | ||
35 | sel->sport_mask = htons(0xffff); | ||
36 | sel->family = AF_INET; | ||
37 | sel->prefixlen_d = 32; | ||
38 | sel->prefixlen_s = 32; | ||
39 | sel->proto = fl4->flowi4_proto; | ||
40 | sel->ifindex = fl4->flowi4_oif; | ||
41 | } | ||
42 | |||
43 | static void | ||
44 | xfrm4_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, | 26 | xfrm4_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, |
45 | const xfrm_address_t *daddr, const xfrm_address_t *saddr) | 27 | const xfrm_address_t *daddr, const xfrm_address_t *saddr) |
46 | { | 28 | { |
@@ -77,7 +59,6 @@ static struct xfrm_state_afinfo xfrm4_state_afinfo = { | |||
77 | .eth_proto = htons(ETH_P_IP), | 59 | .eth_proto = htons(ETH_P_IP), |
78 | .owner = THIS_MODULE, | 60 | .owner = THIS_MODULE, |
79 | .init_flags = xfrm4_init_flags, | 61 | .init_flags = xfrm4_init_flags, |
80 | .init_tempsel = __xfrm4_init_tempsel, | ||
81 | .init_temprop = xfrm4_init_temprop, | 62 | .init_temprop = xfrm4_init_temprop, |
82 | .output = xfrm4_output, | 63 | .output = xfrm4_output, |
83 | .output_finish = xfrm4_output_finish, | 64 | .output_finish = xfrm4_output_finish, |