]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Initialize ip6_tnl.hlen in gre tunnel even if no route is found
authorOussama Ghorbel <ou.ghorbel@gmail.com>
Thu, 10 Oct 2013 17:50:27 +0000 (18:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Oct 2013 21:50:59 +0000 (17:50 -0400)
commit6e4311123c19864dcfa621968d2a7f9a070fbc58
treedfcd9cdbd6fd0750135692bdbbddb5d5e2fcebed
parentf98205015f35fbee8244cd774bb366d209ceaf0b
ipv6: Initialize ip6_tnl.hlen in gre tunnel even if no route is found

The ip6_tnl.hlen (gre and ipv6 headers length) is independent from the
outgoing interface, so it would be better to initialize it even when no
route is found, otherwise its value will be zero.
While I'm not sure if this could happen in real life, but doing that
will avoid to call the skb_push function with a zero in ip6gre_header
function.

Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Oussama Ghorbel <ou.ghorbel@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c