diff options
| -rw-r--r-- | include/net/xfrm.h | 2 | ||||
| -rw-r--r-- | net/ipv4/xfrm4_mode_transport.c | 4 | ||||
| -rw-r--r-- | net/ipv4/xfrm4_mode_tunnel.c | 3 | ||||
| -rw-r--r-- | net/ipv4/xfrm4_output.c | 2 | ||||
| -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 |
8 files changed, 8 insertions, 14 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 0acabf2a0a8f..4d6dc627df9b 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -285,7 +285,7 @@ extern void xfrm_put_type(struct xfrm_type *type); | |||
| 285 | 285 | ||
| 286 | struct xfrm_mode { | 286 | struct xfrm_mode { |
| 287 | int (*input)(struct xfrm_state *x, struct sk_buff *skb); | 287 | int (*input)(struct xfrm_state *x, struct sk_buff *skb); |
| 288 | int (*output)(struct sk_buff *skb); | 288 | int (*output)(struct xfrm_state *x,struct sk_buff *skb); |
| 289 | 289 | ||
| 290 | struct module *owner; | 290 | struct module *owner; |
| 291 | unsigned int encap; | 291 | unsigned int encap; |
diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c index a9e6b3dd19c9..92676b7e4034 100644 --- a/net/ipv4/xfrm4_mode_transport.c +++ b/net/ipv4/xfrm4_mode_transport.c | |||
| @@ -21,9 +21,8 @@ | |||
| 21 | * On exit, skb->h will be set to the start of the payload to be processed | 21 | * On exit, skb->h will be set to the start of the payload to be processed |
| 22 | * by x->type->output and skb->nh will be set to the top IP header. | 22 | * by x->type->output and skb->nh will be set to the top IP header. |
| 23 | */ | 23 | */ |
| 24 | static int xfrm4_transport_output(struct sk_buff *skb) | 24 | static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb) |
| 25 | { | 25 | { |
| 26 | struct xfrm_state *x; | ||
| 27 | struct iphdr *iph; | 26 | struct iphdr *iph; |
| 28 | int ihl; | 27 | int ihl; |
| 29 | 28 | ||
| @@ -33,7 +32,6 @@ static int xfrm4_transport_output(struct sk_buff *skb) | |||
| 33 | ihl = iph->ihl * 4; | 32 | ihl = iph->ihl * 4; |
| 34 | skb->h.raw += ihl; | 33 | skb->h.raw += ihl; |
| 35 | 34 | ||
| 36 | x = skb->dst->xfrm; | ||
| 37 | skb->nh.raw = memmove(skb_push(skb, x->props.header_len), iph, ihl); | 35 | skb->nh.raw = memmove(skb_push(skb, x->props.header_len), iph, ihl); |
| 38 | return 0; | 36 | return 0; |
| 39 | } | 37 | } |
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index 13cafbe56ce3..e23c21d31a53 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
| @@ -33,10 +33,9 @@ static inline void ipip_ecn_decapsulate(struct sk_buff *skb) | |||
| 33 | * On exit, skb->h will be set to the start of the payload to be processed | 33 | * On exit, skb->h will be set to the start of the payload to be processed |
| 34 | * by x->type->output and skb->nh will be set to the top IP header. | 34 | * by x->type->output and skb->nh will be set to the top IP header. |
| 35 | */ | 35 | */ |
| 36 | static int xfrm4_tunnel_output(struct sk_buff *skb) | 36 | static int xfrm4_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) |
| 37 | { | 37 | { |
| 38 | struct dst_entry *dst = skb->dst; | 38 | struct dst_entry *dst = skb->dst; |
| 39 | struct xfrm_state *x = dst->xfrm; | ||
| 40 | struct iphdr *iph, *top_iph; | 39 | struct iphdr *iph, *top_iph; |
| 41 | int flags; | 40 | int flags; |
| 42 | 41 | ||
diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c index 5fd115f0c547..04403fb01a58 100644 --- a/net/ipv4/xfrm4_output.c +++ b/net/ipv4/xfrm4_output.c | |||
| @@ -66,7 +66,7 @@ static int xfrm4_output_one(struct sk_buff *skb) | |||
| 66 | if (err) | 66 | if (err) |
| 67 | goto error; | 67 | goto error; |
| 68 | 68 | ||
| 69 | err = x->mode->output(skb); | 69 | err = x->mode->output(x, skb); |
| 70 | if (err) | 70 | if (err) |
| 71 | goto error; | 71 | goto error; |
| 72 | 72 | ||
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 | ||
