|
@@ -269,7 +269,11 @@ static void ah_input_done(struct crypto_async_request *base, int err)
|
|
|
skb->network_header += ah_hlen;
|
|
|
memcpy(skb_network_header(skb), work_iph, ihl);
|
|
|
__skb_pull(skb, ah_hlen + ihl);
|
|
|
- skb_set_transport_header(skb, -ihl);
|
|
|
+
|
|
|
+ if (x->props.mode == XFRM_MODE_TUNNEL)
|
|
|
+ skb_reset_transport_header(skb);
|
|
|
+ else
|
|
|
+ skb_set_transport_header(skb, -ihl);
|
|
|
out:
|
|
|
kfree(AH_SKB_CB(skb)->tmp);
|
|
|
xfrm_input_resume(skb, err);
|
|
@@ -381,7 +385,10 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
|
|
|
skb->network_header += ah_hlen;
|
|
|
memcpy(skb_network_header(skb), work_iph, ihl);
|
|
|
__skb_pull(skb, ah_hlen + ihl);
|
|
|
- skb_set_transport_header(skb, -ihl);
|
|
|
+ if (x->props.mode == XFRM_MODE_TUNNEL)
|
|
|
+ skb_reset_transport_header(skb);
|
|
|
+ else
|
|
|
+ skb_set_transport_header(skb, -ihl);
|
|
|
|
|
|
err = nexthdr;
|
|
|
|
|
@@ -413,9 +420,12 @@ static void ah4_err(struct sk_buff *skb, u32 info)
|
|
|
if (!x)
|
|
|
return;
|
|
|
|
|
|
- if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
|
|
|
+ if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) {
|
|
|
+ atomic_inc(&flow_cache_genid);
|
|
|
+ rt_genid_bump(net);
|
|
|
+
|
|
|
ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_AH, 0);
|
|
|
- else
|
|
|
+ } else
|
|
|
ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0);
|
|
|
xfrm_state_put(x);
|
|
|
}
|