diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2006-08-31 20:42:59 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:18:48 -0400 |
commit | eb878e84575fbce21d2edb079eada78bfa27023d (patch) | |
tree | f47eb18d4539015596de96ccb9ac3fd20584cbe5 /net/ipv6 | |
parent | fda9ef5d679b07c9d9097aaf6ef7f069d794a8f9 (diff) |
[IPSEC]: output mode to take an xfrm state as input param
Expose IPSEC modes output path to take an xfrm state as input param.
This makes it consistent with the input mode processing (which already
takes the xfrm state as a param).
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/xfrm6_mode_ro.c | 3 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_transport.c | 3 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_tunnel.c | 3 | ||||
-rw-r--r-- | net/ipv6/xfrm6_output.c | 2 |
4 files changed, 4 insertions, 7 deletions
diff --git a/net/ipv6/xfrm6_mode_ro.c b/net/ipv6/xfrm6_mode_ro.c index c11c335312f9..6031c16d46ca 100644 --- a/net/ipv6/xfrm6_mode_ro.c +++ b/net/ipv6/xfrm6_mode_ro.c | |||
@@ -43,9 +43,8 @@ | |||
43 | * its absence, that of the top IP header. The value of skb->data will always | 43 | * its absence, that of the top IP header. The value of skb->data will always |
44 | * point to the top IP header. | 44 | * point to the top IP header. |
45 | */ | 45 | */ |
46 | static int xfrm6_ro_output(struct sk_buff *skb) | 46 | static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb) |
47 | { | 47 | { |
48 | struct xfrm_state *x = skb->dst->xfrm; | ||
49 | struct ipv6hdr *iph; | 48 | struct ipv6hdr *iph; |
50 | u8 *prevhdr; | 49 | u8 *prevhdr; |
51 | int hdr_len; | 50 | int hdr_len; |
diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c index a5dce216024d..3a4b39b12bad 100644 --- a/net/ipv6/xfrm6_mode_transport.c +++ b/net/ipv6/xfrm6_mode_transport.c | |||
@@ -25,9 +25,8 @@ | |||
25 | * its absence, that of the top IP header. The value of skb->data will always | 25 | * its absence, that of the top IP header. The value of skb->data will always |
26 | * point to the top IP header. | 26 | * point to the top IP header. |
27 | */ | 27 | */ |
28 | static int xfrm6_transport_output(struct sk_buff *skb) | 28 | static int xfrm6_transport_output(struct xfrm_state *x, struct sk_buff *skb) |
29 | { | 29 | { |
30 | struct xfrm_state *x = skb->dst->xfrm; | ||
31 | struct ipv6hdr *iph; | 30 | struct ipv6hdr *iph; |
32 | u8 *prevhdr; | 31 | u8 *prevhdr; |
33 | int hdr_len; | 32 | int hdr_len; |
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 8af79be2edca..5e7d8a7d6414 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -37,10 +37,9 @@ static inline void ipip6_ecn_decapsulate(struct sk_buff *skb) | |||
37 | * its absence, that of the top IP header. The value of skb->data will always | 37 | * its absence, that of the top IP header. The value of skb->data will always |
38 | * point to the top IP header. | 38 | * point to the top IP header. |
39 | */ | 39 | */ |
40 | static int xfrm6_tunnel_output(struct sk_buff *skb) | 40 | static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) |
41 | { | 41 | { |
42 | struct dst_entry *dst = skb->dst; | 42 | struct dst_entry *dst = skb->dst; |
43 | struct xfrm_state *x = dst->xfrm; | ||
44 | struct ipv6hdr *iph, *top_iph; | 43 | struct ipv6hdr *iph, *top_iph; |
45 | int dsfield; | 44 | int dsfield; |
46 | 45 | ||
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c index db58104e710b..c260ea104c52 100644 --- a/net/ipv6/xfrm6_output.c +++ b/net/ipv6/xfrm6_output.c | |||
@@ -65,7 +65,7 @@ static int xfrm6_output_one(struct sk_buff *skb) | |||
65 | if (err) | 65 | if (err) |
66 | goto error; | 66 | goto error; |
67 | 67 | ||
68 | err = x->mode->output(skb); | 68 | err = x->mode->output(x, skb); |
69 | if (err) | 69 | if (err) |
70 | goto error; | 70 | goto error; |
71 | 71 | ||