]> git.baikalelectronics.ru Git - kernel.git/commit
esp: Fix ESN generation under UDP encapsulation
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 18 Jun 2016 05:03:36 +0000 (13:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jun 2016 15:52:00 +0000 (11:52 -0400)
commit686b229dbbcb5af0d632fbb588163baa11f2bbb9
tree69f4d8c0f39720c66ad9088b9bbaa3e7439cfdc1
parentcaeab6daded6cd2d1434e5b19c80a33437e4c19d
esp: Fix ESN generation under UDP encapsulation

Blair Steven noticed that ESN in conjunction with UDP encapsulation
is broken because we set the temporary ESP header to the wrong spot.

This patch fixes this by first of all using the right spot, i.e.,
4 bytes off the real ESP header, and then saving this information
so that after encryption we can restore it properly.

Fixes: 6eb6b9db1248 ("esp4: Switch to new AEAD interface")
Reported-by: Blair Steven <Blair.Steven@alliedtelesis.co.nz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/esp4.c