Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp953177rwi; Fri, 14 Oct 2022 10:42:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6iJiKXUD7O+j2urhjZRc8VWCT6fw+Cq+sc7c17D2cJZB+M3MIHzniELYXbnnDKVkrKCWtg X-Received: by 2002:a17:902:ab1d:b0:180:4030:757d with SMTP id ik29-20020a170902ab1d00b001804030757dmr6065670plb.155.1665769323856; Fri, 14 Oct 2022 10:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665769323; cv=none; d=google.com; s=arc-20160816; b=U5Q94T5otleNucfWNbKOCsjkWSAhN3hoAtnjZEWOxDgXcOJ6T7Oux52Vi6/6sVxbcY UgVPg4Av4V5CAHZvifs/cCUDJFsOVWIaTDYL/Q5c3y0yJiuvXTFGCIWBBYC6SY93MIXJ LaCpZ9BBb3KPW30hT7gOMv6UkCsmzn1TH8vx/HJzlAIGizrSnzi2QV810V7ZWw3LMahf RH2XNGAh5L44X1La9bFaOD9GwJr1G1Q9fW6/i2pgs/uMi9Qsn7Am4KKwChs8EyMp4NpJ oNmZjIC47YKclF/goqByPEg4WMucOaKtVqj7dSTsx4MmxK42jhPfiEjmusXjA+WHP0UR uNUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EyQhJSXWD0na1sAKSM1PZmYSSPO/aWIU0nptxObWazE=; b=C2yCzbEScndZZYiNQUSqp0IOJDCr4lVun/CanUmXY/1s/Ea3Wk8bE9VP5M1eYzUt+E BZ5UJFaFjSfceDRG/mTqMBqmsh+z9K7UqNrOu07XjL8ozmY5jzifw8mvVy4u1+3xnCGn WZcCCUkVhhLOETIy2pZ7FBKx+R2tZ9agdGgAHsn/BWEcB3C8Y4WvOYeDH5sD21kk3PZl 3NggaEG4f7wBxFtHqdH3RncXXHnPygvmecrXoTaWz9oFN/dbCBcd3qVBcQV052O8KSZP 2enp7jXDwkeVAiGx7zdrCI45kNKolsTNR10nijoEDdQtaZ0R+AdcjtHBDDiDdQk37dQE WCHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@codeweavers.com header.s=6377696661 header.b=uEgxfjID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codeweavers.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e37-20020a635465000000b0041c033e9f54si3114242pgm.848.2022.10.14.10.41.48; Fri, 14 Oct 2022 10:42:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@codeweavers.com header.s=6377696661 header.b=uEgxfjID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codeweavers.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231303AbiJNRUr (ORCPT + 99 others); Fri, 14 Oct 2022 13:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbiJNRUp (ORCPT ); Fri, 14 Oct 2022 13:20:45 -0400 Received: from mail.codeweavers.com (mail.codeweavers.com [65.103.31.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A7EF57258; Fri, 14 Oct 2022 10:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codeweavers.com; s=6377696661; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EyQhJSXWD0na1sAKSM1PZmYSSPO/aWIU0nptxObWazE=; b=uEgxfjID/ryR0D1gRZ5Kc09HlE 6aAUzHPkO0ssSS1gUAxN1YIpuxr/6H8jkg/fuvGKw+lSPUpK9OCDp8O/A0OChVftlUhk1anfpqUDK b4eciePkveCm2K67nUpu4jLTLLycFy1haQSV2hE+KcrVnMUOoUCLenkosWfDFqYPIeWo=; Received: from cw141ip123.vpn.codeweavers.com ([10.69.141.123]) by mail.codeweavers.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ojOMS-00GB8q-88; Fri, 14 Oct 2022 12:20:40 -0500 Message-ID: <03031c84-baa0-fe99-b1d7-44963cad0001@codeweavers.com> Date: Fri, 14 Oct 2022 12:20:37 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [RFC] EADDRINUSE from bind() on application restart after killing Content-Language: en-GB To: Eric Dumazet Cc: Muhammad Usama Anjum , "open list:NETWORKING [TCP]" , LKML , "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Paolo Abeni , Jakub Kicinski References: <5099dc39-c6d9-115a-855b-6aa98d17eb4b@collabora.com> <8dff3e46-6dac-af6a-1a3b-e6a8b93fdc60@collabora.com> <5db967de-ea7e-9f35-cd74-d4cca2fcb9ee@codeweavers.com> <81b0e6c9-6c13-aecd-1e0e-6417eb89285f@codeweavers.com> <342a762d-22f5-b979-411f-aab0474feda2@codeweavers.com> From: Paul Gofman In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/14/22 11:45, Eric Dumazet wrote: > On Fri, Oct 14, 2022 at 9:39 AM Paul Gofman wrote: > > I think it is documented. > > man 7 socket > > SO_REUSEADDR > Indicates that the rules used in validating addresses > supplied in a bind(2) call should allow reuse of local addresses. For > AF_INET sockets this means > that a socket may bind, except when there is an active > listening socket bound to the address. When the listening socket is > bound to INADDR_ANY with a > specific port then it is not possible to bind to this > port for any local address. Argument is an integer boolean flag. > > You seem to need another way, so you will have to ask this question in IETF. Thanks a lot, I think it answers my question, I am afraid I was reading this a bit wrong.