diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /net/ipv4/xfrm4_state.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'net/ipv4/xfrm4_state.c')
-rw-r--r-- | net/ipv4/xfrm4_state.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c index 47947624eccc..d9ac0a0058b5 100644 --- a/net/ipv4/xfrm4_state.c +++ b/net/ipv4/xfrm4_state.c | |||
@@ -21,24 +21,26 @@ static int xfrm4_init_flags(struct xfrm_state *x) | |||
21 | } | 21 | } |
22 | 22 | ||
23 | static void | 23 | static void |
24 | __xfrm4_init_tempsel(struct xfrm_selector *sel, struct flowi *fl) | 24 | __xfrm4_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl) |
25 | { | 25 | { |
26 | sel->daddr.a4 = fl->fl4_dst; | 26 | const struct flowi4 *fl4 = &fl->u.ip4; |
27 | sel->saddr.a4 = fl->fl4_src; | 27 | |
28 | sel->dport = xfrm_flowi_dport(fl); | 28 | sel->daddr.a4 = fl4->daddr; |
29 | sel->saddr.a4 = fl4->saddr; | ||
30 | sel->dport = xfrm_flowi_dport(fl, &fl4->uli); | ||
29 | sel->dport_mask = htons(0xffff); | 31 | sel->dport_mask = htons(0xffff); |
30 | sel->sport = xfrm_flowi_sport(fl); | 32 | sel->sport = xfrm_flowi_sport(fl, &fl4->uli); |
31 | sel->sport_mask = htons(0xffff); | 33 | sel->sport_mask = htons(0xffff); |
32 | sel->family = AF_INET; | 34 | sel->family = AF_INET; |
33 | sel->prefixlen_d = 32; | 35 | sel->prefixlen_d = 32; |
34 | sel->prefixlen_s = 32; | 36 | sel->prefixlen_s = 32; |
35 | sel->proto = fl->proto; | 37 | sel->proto = fl4->flowi4_proto; |
36 | sel->ifindex = fl->oif; | 38 | sel->ifindex = fl4->flowi4_oif; |
37 | } | 39 | } |
38 | 40 | ||
39 | static void | 41 | static void |
40 | xfrm4_init_temprop(struct xfrm_state *x, struct xfrm_tmpl *tmpl, | 42 | xfrm4_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, |
41 | xfrm_address_t *daddr, xfrm_address_t *saddr) | 43 | const xfrm_address_t *daddr, const xfrm_address_t *saddr) |
42 | { | 44 | { |
43 | x->id = tmpl->id; | 45 | x->id = tmpl->id; |
44 | if (x->id.daddr.a4 == 0) | 46 | if (x->id.daddr.a4 == 0) |
@@ -53,7 +55,7 @@ xfrm4_init_temprop(struct xfrm_state *x, struct xfrm_tmpl *tmpl, | |||
53 | 55 | ||
54 | int xfrm4_extract_header(struct sk_buff *skb) | 56 | int xfrm4_extract_header(struct sk_buff *skb) |
55 | { | 57 | { |
56 | struct iphdr *iph = ip_hdr(skb); | 58 | const struct iphdr *iph = ip_hdr(skb); |
57 | 59 | ||
58 | XFRM_MODE_SKB_CB(skb)->ihl = sizeof(*iph); | 60 | XFRM_MODE_SKB_CB(skb)->ihl = sizeof(*iph); |
59 | XFRM_MODE_SKB_CB(skb)->id = iph->id; | 61 | XFRM_MODE_SKB_CB(skb)->id = iph->id; |
@@ -76,6 +78,7 @@ static struct xfrm_state_afinfo xfrm4_state_afinfo = { | |||
76 | .init_tempsel = __xfrm4_init_tempsel, | 78 | .init_tempsel = __xfrm4_init_tempsel, |
77 | .init_temprop = xfrm4_init_temprop, | 79 | .init_temprop = xfrm4_init_temprop, |
78 | .output = xfrm4_output, | 80 | .output = xfrm4_output, |
81 | .output_finish = xfrm4_output_finish, | ||
79 | .extract_input = xfrm4_extract_input, | 82 | .extract_input = xfrm4_extract_input, |
80 | .extract_output = xfrm4_extract_output, | 83 | .extract_output = xfrm4_extract_output, |
81 | .transport_finish = xfrm4_transport_finish, | 84 | .transport_finish = xfrm4_transport_finish, |