diff options
Diffstat (limited to 'net/ipv6/xfrm6_state.c')
-rw-r--r-- | net/ipv6/xfrm6_state.c | 14 |
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 @@ | |||
22 | static void | 22 | static 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 | ||
40 | static void | 42 | static void |