diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/esp4.c | 2 | ||||
-rw-r--r-- | net/ipv6/esp6.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 5e5613930ffb..bdc65d8af181 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
@@ -64,7 +64,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) | |||
64 | esph = (struct ip_esp_hdr *)(skb_network_header(skb) + | 64 | esph = (struct ip_esp_hdr *)(skb_network_header(skb) + |
65 | top_iph->ihl * 4); | 65 | top_iph->ihl * 4); |
66 | top_iph->tot_len = htons(skb->len + alen); | 66 | top_iph->tot_len = htons(skb->len + alen); |
67 | *(skb_tail_pointer(skb) - 1) = top_iph->protocol; | 67 | *(skb_tail_pointer(trailer) - 1) = top_iph->protocol; |
68 | 68 | ||
69 | /* this is non-NULL only with UDP Encapsulation */ | 69 | /* this is non-NULL only with UDP Encapsulation */ |
70 | if (x->encap) { | 70 | if (x->encap) { |
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; |