]> git.karo-electronics.de Git - karo-tx-linux.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)
commitbf58175954f2d390300df00f96070312d1b15096
treedfcd9cdbd6fd0750135692bdbbddb5d5e2fcebed
parentff704050f2fc0f3382b5a70bba56a51a3feca79d
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