aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-04-09 14:46:17 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:37 -0400
commit557922584d9c5b6b990bcfb2fec3134f0e73a05d (patch)
treef7944ace44efa532fbee23db0709760bfb70ec98 /net/ipv6
parent56eb88828b78f6f3b11a2996350092a40745301f (diff)
[XFRM]: esp: fix skb_tail_pointer conversion bug
Fix incorrect switch of "trailer" skb by "skb" during skb_tail_pointer conversion: - *(u8*)(trailer->tail - 1) = top_iph->protocol; + *(skb_tail_pointer(skb) - 1) = top_iph->protocol; - *(u8 *)(trailer->tail - 1) = *skb_network_header(skb); + *(skb_tail_pointer(skb) - 1) = *skb_network_header(skb); Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/esp6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index b8e8914cc002..6b76c4c31137 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -91,7 +91,7 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
91 top_iph = (struct ipv6hdr *)__skb_push(skb, hdr_len); 91 top_iph = (struct ipv6hdr *)__skb_push(skb, hdr_len);
92 esph = (struct ipv6_esp_hdr *)skb_transport_header(skb); 92 esph = (struct ipv6_esp_hdr *)skb_transport_header(skb);
93 top_iph->payload_len = htons(skb->len + alen - sizeof(*top_iph)); 93 top_iph->payload_len = htons(skb->len + alen - sizeof(*top_iph));
94 *(skb_tail_pointer(skb) - 1) = *skb_network_header(skb); 94 *(skb_tail_pointer(trailer) - 1) = *skb_network_header(skb);
95 *skb_network_header(skb) = IPPROTO_ESP; 95 *skb_network_header(skb) = IPPROTO_ESP;
96 96
97 esph->spi = x->id.spi; 97 esph->spi = x->id.spi;