diff options
author | Eric Dumazet <edumazet@google.com> | 2015-12-15 20:56:44 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-22 20:55:49 -0800 |
commit | 01cbe8048f652c080b62830d72fced8221fec85f (patch) | |
tree | 9db73cf81fe3f6bb1dece7c0352dfa76cdc29788 | |
parent | 5e31e634d98356bfde9b1057daf21da489274456 (diff) | |
download | lwn-01cbe8048f652c080b62830d72fced8221fec85f.tar.gz lwn-01cbe8048f652c080b62830d72fced8221fec85f.zip |
inet: tcp: fix inetpeer_set_addr_v4()
[ Upstream commit 887dc9f2cef6e98dcccf807da5e6faf4f60ba483 ]
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: 192132b9a034 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/net/inetpeer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index 4a6009d4486b..235c7811a86a 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h @@ -78,6 +78,7 @@ void inet_initpeers(void) __init; static inline void inetpeer_set_addr_v4(struct inetpeer_addr *iaddr, __be32 ip) { iaddr->a4.addr = ip; + iaddr->a4.vif = 0; iaddr->family = AF_INET; } |