Commit 069294e8 authored by Nick Bowler's avatar Nick Bowler Committed by David S. Miller

ah: Correctly pass error codes in ahash output callback.

The AH4/6 ahash output callbacks pass nexthdr to xfrm_output_resume
instead of the error code.  This appears to be a copy+paste error from
the input case, where nexthdr is expected.  This causes the driver to
continuously add AH headers to the datagram until either an allocation
fails and the packet is dropped or the ahash driver hits a synchronous
fallback and the resulting monstrosity is transmitted.

Correct this issue by simply passing the error code unadulterated.
Signed-off-by: default avatarNick Bowler <nbowler@elliptictech.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fecc7351
...@@ -136,8 +136,6 @@ static void ah_output_done(struct crypto_async_request *base, int err) ...@@ -136,8 +136,6 @@ static void ah_output_done(struct crypto_async_request *base, int err)
memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr));
} }
err = ah->nexthdr;
kfree(AH_SKB_CB(skb)->tmp); kfree(AH_SKB_CB(skb)->tmp);
xfrm_output_resume(skb, err); xfrm_output_resume(skb, err);
} }
......
...@@ -324,8 +324,6 @@ static void ah6_output_done(struct crypto_async_request *base, int err) ...@@ -324,8 +324,6 @@ static void ah6_output_done(struct crypto_async_request *base, int err)
#endif #endif
} }
err = ah->nexthdr;
kfree(AH_SKB_CB(skb)->tmp); kfree(AH_SKB_CB(skb)->tmp);
xfrm_output_resume(skb, err); xfrm_output_resume(skb, err);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment