]> 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)
commitd084b0638b2ca11cdf6e874ec9e638e7900c7e91
treedfcd9cdbd6fd0750135692bdbbddb5d5e2fcebed
parent34e3f176922d966bcf28d37d90f79d6c8bb69d3b
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