]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commit
gre: fix handling of key 0
authorstephen hemminger <shemminger@vyatta.com>
Mon, 24 Sep 2012 18:12:23 +0000 (18:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Sep 2012 22:12:37 +0000 (18:12 -0400)
commitd208328765a0ab425e36b5b828285f3337a85451
tree80897cfb2f5537bdfbda57a736a91a04c85a1ceb
parentaa99521eed6b77628f6f54ff6b2903f4130c0808
gre: fix handling of key 0

GRE driver incorrectly uses zero as a flag value. Zero is a perfectly
valid value for key, and the tunnel should match packets with no key only
with tunnels created without key, and vice versa.

This is a slightly visible  change since previously it might be possible to
construct a working tunnel that sent key 0 and received only because
of the key wildcard of zero.  I.e the sender sent key of zero, but tunnel
was defined without key.

Note: using gre key 0 requires iproute2 utilities v3.2 or later.
The original utility code was broken as well.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c