From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06D8BC55ABD for ; Tue, 10 Nov 2020 07:33:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2603207BC for ; Tue, 10 Nov 2020 07:33:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Bab2g9wn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728966AbgKJHdG (ORCPT ); Tue, 10 Nov 2020 02:33:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgKJHdE (ORCPT ); Tue, 10 Nov 2020 02:33:04 -0500 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB45CC0613D3 for ; Mon, 9 Nov 2020 23:33:04 -0800 (PST) Received: by mail-io1-xd43.google.com with SMTP id t8so8298404iov.8 for ; Mon, 09 Nov 2020 23:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o42yGNfUzOTdDPMZ3l6k7Cu/Tlmyay1zu48jmpASnXo=; b=Bab2g9wnlFOdi/TfY6YIOWflmuIFwIHWvW+UQ8g9wuKqnu2gokJkIVhoGPs/zuFUWR jIDj+cDiTAaPP46Y+p15eLHbDUHvcZvnAEQu0v41Xn4IOg/pP94cY6JHYbhopGRLuv9Q 90c6vd+0UbBZ+YWv38kcIcwIM/6/LYUazCgbDgD+VYBNpxw57TC6yhhkI+jhcN2Oi4ax JAZjyMajGAMJIOwfeP0FaFBjw+HcggDQNt05ajNW1wcryUsp1dVQ1n1ROGiZ48SthM1W jge5/bI+y2K+BwPs6YfVs+MTULHNdBnZ5lLI8HTnm81Q6mdSWqd1mi2DHVMgwaDEj59z 5shg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o42yGNfUzOTdDPMZ3l6k7Cu/Tlmyay1zu48jmpASnXo=; b=lwe7GN5s1xG0K3lDp8YMZUHZy2IQF7iUb9rF1plnYiDXKQnMJ90VJGtHvH65RrA0xw TYYmjnqKj7tSymEqTlYH0xe6uCy1wHuBa52YhnwbhzYaMieSX4BDIZhM0sJIcA+VX8iA bK+rTovLXZlDdApqKEXf8YZGu7IThuvhxS5Xhy4QHNvw9xHW3/ozoRKeRbF3Bpa0e5Lb ZY2MhNUMQy9vnAfw8GrKXISKQHNtsH9UIr4VpDXtWdOFJD21hCT1azzzpZNMtammpK7W LcvBSUASgzwIQWFptK/VNgIlG8d/iYFpy6Zo0Y4CDmD8PCq8VC0OTE8ElxUc/G+6zIhc CCiw== X-Gm-Message-State: AOAM533h2EHFaoS2BFGn7LrzRUkDOX7o7fzD05NjYjxt2u3byHqBd1WQ eeyvmX1ZfrfZQMul0hvIgw5xzgTFPEN5v4J2ns+E0hFFTc0= X-Google-Smtp-Source: ABdhPJyCBy+StTa8YbefPs//qaLrA521z8TjMcBYMBBGBGWOOM43GVtYy+eGtrbbiJr3uDykhgeeYY66LGg9YDDIxiY= X-Received: by 2002:a5e:980e:: with SMTP id s14mr13190769ioj.195.1604993583691; Mon, 09 Nov 2020 23:33:03 -0800 (PST) MIME-Version: 1.0 References: <1604967391-123737-1-git-send-email-wenan.mao@linux.alibaba.com> In-Reply-To: <1604967391-123737-1-git-send-email-wenan.mao@linux.alibaba.com> From: Eric Dumazet Date: Tue, 10 Nov 2020 08:32:52 +0100 Message-ID: Subject: Re: [PATCH net v5] net: Update window_clamp if SOCK_RCVBUF is set To: Mao Wenan Cc: David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski , netdev , LKML , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Nov 10, 2020 at 1:16 AM Mao Wenan wrote: > > When net.ipv4.tcp_syncookies=1 and syn flood is happened, > cookie_v4_check or cookie_v6_check tries to redo what > tcp_v4_send_synack or tcp_v6_send_synack did, > rsk_window_clamp will be changed if SOCK_RCVBUF is set, > which will make rcv_wscale is different, the client > still operates with initial window scale and can overshot > granted window, the client use the initial scale but local > server use new scale to advertise window value, and session > work abnormally. > > Fixes: e88c64f0a425 ("tcp: allow effective reduction of TCP's rcv-buffer via setsockopt") > Signed-off-by: Mao Wenan Signed-off-by: Eric Dumazet Thanks !