]> git.baikalelectronics.ru Git - kernel.git/commit
inet: tcp: fix inetpeer_set_addr_v4()
authorEric Dumazet <edumazet@google.com>
Wed, 16 Dec 2015 04:56:44 +0000 (20:56 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Dec 2015 05:14:12 +0000 (00:14 -0500)
commitb01faa180114f2c3e626d906872613051324809f
treeb398a3d5b92d040656d8336ef2658ec3375789ae
parent9bcb241ca6e568affc742a1163d4ff090f5fdf7d
inet: tcp: fix inetpeer_set_addr_v4()

David Ahern added a vif field in the a4 part of inetpeer_addr struct.

This broke IPv4 TCP fast open client side and more generally tcp metrics
cache, because inetpeer_addr_cmp() is now comparing two u32 instead of
one.

inetpeer_set_addr_v4() needs to properly init vif field, otherwise
the comparison result depends on uninitialized data.

Fixes: 594d8f13fa18 ("net: Add support for VRFs to inetpeer cache")
Reported-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inetpeer.h