net/ipv6: Fix CALIPSO causing GPF with datagram support
authorRichard Haines <richard_c_haines@btinternet.com>
Mon, 5 Jun 2017 15:44:40 +0000 (16:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jun 2017 19:18:20 +0000 (15:18 -0400)
commite3ebdb20fddacded2740a333ff66781e0d28b05c
tree09a5abbbaf8b95512c9eb5d3ab6f82a500179660
parent594238158bf748c285f0a73222cd9b7ccf3c525d
net/ipv6: Fix CALIPSO causing GPF with datagram support

When using CALIPSO with IPPROTO_UDP it is possible to trigger a GPF as the
IP header may have moved.

Also update the payload length after adding the CALIPSO option.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/calipso.c