aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/xfrm6_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/xfrm6_state.c')
-rw-r--r--net/ipv6/xfrm6_state.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c
index b456533a652d..afe941e9415c 100644
--- a/net/ipv6/xfrm6_state.c
+++ b/net/ipv6/xfrm6_state.c
@@ -22,19 +22,21 @@
22static void 22static void
23__xfrm6_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl) 23__xfrm6_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl)
24{ 24{
25 const struct flowi6 *fl6 = &fl->u.ip6;
26
25 /* Initialize temporary selector matching only 27 /* Initialize temporary selector matching only
26 * to current session. */ 28 * to current session. */
27 ipv6_addr_copy((struct in6_addr *)&sel->daddr, &fl->fl6_dst); 29 ipv6_addr_copy((struct in6_addr *)&sel->daddr, &fl6->daddr);
28 ipv6_addr_copy((struct in6_addr *)&sel->saddr, &fl->fl6_src); 30 ipv6_addr_copy((struct in6_addr *)&sel->saddr, &fl6->saddr);
29 sel->dport = xfrm_flowi_dport(fl, &fl->u.ip6.uli); 31 sel->dport = xfrm_flowi_dport(fl, &fl6->uli);
30 sel->dport_mask = htons(0xffff); 32 sel->dport_mask = htons(0xffff);
31 sel->sport = xfrm_flowi_sport(fl, &fl->u.ip6.uli); 33 sel->sport = xfrm_flowi_sport(fl, &fl6->uli);
32 sel->sport_mask = htons(0xffff); 34 sel->sport_mask = htons(0xffff);
33 sel->family = AF_INET6; 35 sel->family = AF_INET6;
34 sel->prefixlen_d = 128; 36 sel->prefixlen_d = 128;
35 sel->prefixlen_s = 128; 37 sel->prefixlen_s = 128;
36 sel->proto = fl->flowi_proto; 38 sel->proto = fl6->flowi6_proto;
37 sel->ifindex = fl->flowi_oif; 39 sel->ifindex = fl6->flowi6_oif;
38} 40}
39 41
40static void 42static void