ah: Correctly pass error codes in ahash output callback.
authorNick Bowler <nbowler@elliptictech.com>
Tue, 8 Nov 2011 12:12:44 +0000 (12:12 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Jan 2012 01:24:51 +0000 (17:24 -0800)
commitd253520a7b2c2223fb4f704f06d10f2c547bdeef
tree5bfcb9bec089ba770b70011da319dcea23b9ac37
parent8039a47e67451b8efd6100c4a7f27829fc2d8edd
ah: Correctly pass error codes in ahash output callback.

commit 069294e813ed5f27f82613b027609bcda5f1b914 upstream.

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: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/ah4.c
net/ipv6/ah6.c