]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: fix header length calculation in ip6_append_data()
authorRomain KUNTZ <r.kuntz@ipflavors.com>
Wed, 16 Jan 2013 12:47:40 +0000 (12:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jan 2013 08:37:13 +0000 (03:37 -0500)
commitea2fc7fbd09b9d55cd43e465af456c44921da314
treeb6f0487a10e42cb0ef89f380c7a78c4ee871e585
parent97c252aa685e94d061de58a7b1511b8a631d8654
ipv6: fix header length calculation in ip6_append_data()

Commit c15bf297 (ipv6: Fix IPsec slowpath fragmentation problem)
has introduced a error in the header length calculation that
provokes corrupted packets when non-fragmentable extensions
headers (Destination Option or Routing Header Type 2) are used.

rt->rt6i_nfheader_len is the length of the non-fragmentable
extension header, and it should be substracted to
rt->dst.header_len, and not to exthdrlen, as it was done before
commit c15bf297.

This patch reverts to the original and correct behavior. It has
been successfully tested with and without IPsec on packets
that include non-fragmentable extensions headers.

Signed-off-by: Romain Kuntz <r.kuntz@ipflavors.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_output.c