Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662AbdIWAVF (ORCPT ); Fri, 22 Sep 2017 20:21:05 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:37419 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbdIWAUS (ORCPT ); Fri, 22 Sep 2017 20:20:18 -0400 X-Google-Smtp-Source: AOwi7QD9nQw4Bf/NgQP9cyYN7hzGKfPgsmFygZWHUtakP0MEWI8k0oxlwgL23ZlrTjB4jmbSF0uUSw== From: Josef Bacik To: davem@davemloft.net, netdev@vger.kernel.org, kernel-team@fb.com, linux-kernel@vger.kernel.org Cc: Josef Bacik Subject: [PATCH 1/3] net: set tb->fast_sk_family Date: Fri, 22 Sep 2017 20:20:06 -0400 Message-Id: <1506126008-9148-2-git-send-email-josef@toxicpanda.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506126008-9148-1-git-send-email-josef@toxicpanda.com> References: <1506126008-9148-1-git-send-email-josef@toxicpanda.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1278 Lines: 34 From: Josef Bacik We need to set the tb->fast_sk_family properly so we can use the proper comparison function for all subsequent reuseport bind requests. Fixes: 637bc8bbe6c0 ("inet: reset tb->fastreuseport when adding a reuseport sk") Reported-and-tested-by: Cole Robinson Signed-off-by: Josef Bacik --- net/ipv4/inet_connection_sock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index b9c64b40a83a..f87f4805e244 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -328,6 +328,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum) tb->fastuid = uid; tb->fast_rcv_saddr = sk->sk_rcv_saddr; tb->fast_ipv6_only = ipv6_only_sock(sk); + tb->fast_sk_family = sk->sk_family; #if IS_ENABLED(CONFIG_IPV6) tb->fast_v6_rcv_saddr = sk->sk_v6_rcv_saddr; #endif @@ -354,6 +355,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum) tb->fastuid = uid; tb->fast_rcv_saddr = sk->sk_rcv_saddr; tb->fast_ipv6_only = ipv6_only_sock(sk); + tb->fast_sk_family = sk->sk_family; #if IS_ENABLED(CONFIG_IPV6) tb->fast_v6_rcv_saddr = sk->sk_v6_rcv_saddr; #endif -- 2.7.4