geneve: Check family when reusing sockets.
authorJesse Gross <jesse@nicira.com>
Sat, 3 Jan 2015 02:26:05 +0000 (18:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jan 2015 03:21:33 +0000 (22:21 -0500)
commit46b1e4f9115d48d17bb92f612e4fa45a521a0537
treeedd0f79855de7b3c410af090e2d1a7790ab362d6
parentdf5dba8e52be50e615e03ef73b34611d82587f42
geneve: Check family when reusing sockets.

When searching for an existing socket to reuse, the address family
is not taken into account - only port number. This means that an
IPv4 socket could be used for IPv6 traffic and vice versa, which
is sure to cause problems when passing packets.

It is not possible to trigger this problem currently because the
only user of Geneve creates just IPv4 sockets. However, that is
likely to change in the near future.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/geneve.c