ipv6: syncookies: do not skip ->iif initialization
authorFlorian Westphal <fw@strlen.de>
Sun, 13 Jun 2010 11:29:39 +0000 (11:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jun 2010 01:10:29 +0000 (18:10 -0700)
commit2bbdf389a9432270147c8e8e35b021ad61772f65
tree0c91db74045feaa62a7c11a7757052adcff2c3f6
parent82695d9b186dcefe9bd119b53521deec20858f19
ipv6: syncookies: do not skip ->iif initialization

When syncookies are in effect, req->iif is left uninitialized.
In case of e.g. link-local addresses the route lookup then fails
and no syn-ack is sent.

Rearrange things so ->iif is also initialized in the syncookie case.

want_cookie can only be true when the isn was zero, thus move the want_cookie
check into the "!isn" branch.

Cc: Glenn Griffin <ggriffin.kernel@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/tcp_ipv6.c