Re: [Idr] TCP & BGP: Some don't send terminate BGP when holdtimer expired, because TCP recv window is 0

Robert Raszuk <> Thu, 17 December 2020 10:21 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 9EB993A15E6 for <>; Thu, 17 Dec 2020 02:21:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.088
X-Spam-Status: No, score=-2.088 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Hq69u9D0n7hl for <>; Thu, 17 Dec 2020 02:21:13 -0800 (PST)
Received: from ( [IPv6:2a00:1450:4864:20::131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id C59B03A15DC for <>; Thu, 17 Dec 2020 02:21:12 -0800 (PST)
Received: by with SMTP id x20so36450954lfe.12 for <>; Thu, 17 Dec 2020 02:21:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hypea0K3/RmNzPOTPQ4vjNjbDaGy4a8TOAiST1W8FHI=; b=OkXZti977ThUr/JigXIiismrfWRVsbnK4q3U9vkB4+WCYsPGlSgFKnYySTaqtWYb7Z A+tV5yWg8XLlt8ZQXBB9XA3XukAEpugWpT+WIA2rZKKWllSbpIbdff6bqIOGVqdZfOLU s5NIchAVShRdDFC8H+Ziw1m8emBJqCxIUFUldo8ReG/MJQuIzdVEJHNLu/nNLvgQWLQi KjkjjyaL220IDD1CHMzn1s5aBydTytTjBHK+QPxQ/KzOZMyWfEnh6y3Q6om5sLFkLLz9 lOXmuJE5TO3TTYrxsliVeYVZ+eYaye/S+oviIbeJJK4ZL7DFb46ZLWkyKhR622MwCpyH a7NA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hypea0K3/RmNzPOTPQ4vjNjbDaGy4a8TOAiST1W8FHI=; b=ezHS/KynZiv3iypEUIlVx2kgQjbZmQ5bbGjef6d69qBr/egDo4mQ6iCf7I5yPVmSXn FFkG0zowqE6+GmfJnvATAJqi82hHrQmorD5dUS4CYrxwR91CdL9PgHvavueEyiUNfjAH w6y3cyjmlSJilE5ckURvAOOODJfgfzAlnUp45xZD0Ag8dlE2N3azOfd7krFwY9ap3aFl wc6Y+PPBQl1cdRHpxXLeYlBTOMZQra3rlUJsCPoTW3Joxkp8Rih0Y/dV4aNAGB/ZI86c 8pPGSbBl+NDNSnXBkJY4X+vANtItU/MPuCDq3tEhEvnfRrYFZcV+DxuYiLi5IDQStlaC oj4g==
X-Gm-Message-State: AOAM530CKHP4T87KPjNiX3b0ZQ/yUHRrTp79sZUKFFnQRusftJQ9DVob cFj1bP+rKsvYdIsxRQ++88Yxndp2WSI3Ma8EfNGTMw==
X-Google-Smtp-Source: ABdhPJwJKsKnqwTHl2qX4lWGCAQZ/eKqYhd3cf4TC/nngZ+ZcsrTrpKbvdP7KfHjhSqwVKgRkYaZaiuKsSPvUi6P+ek=
X-Received: by 2002:a2e:9906:: with SMTP id v6mr16703480lji.361.1608200470352; Thu, 17 Dec 2020 02:21:10 -0800 (PST)
MIME-Version: 1.0
References: <>
In-Reply-To: <>
From: Robert Raszuk <>
Date: Thu, 17 Dec 2020 11:20:59 +0100
Message-ID: <>
To: Enke Chen <>
Cc: Job Snijders <>, "idr@ietf. org" <>
Content-Type: multipart/alternative; boundary="000000000000c362d605b6a659af"
Archived-At: <>
Subject: Re: [Idr] TCP & BGP: Some don't send terminate BGP when holdtimer expired, because TCP recv window is 0
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Inter-Domain Routing <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 17 Dec 2020 10:21:15 -0000

Good catch Enke !

Also what if TCP rcv takes the BGP messages and passes it to BGP I/O InQ
which drops it for some reason right there ? Looks to me like we are not
going to detect any event like this here. But the problem we are trying to
address will persist. I think in this thread we are focusing too much on
transport vs application level detection.

And I will repeat the question already stated ... Why rcv would not close
the session in spite of missing KEEPALIVES or UPDATES ?


PS. Side note: BGP Operational Message addresses this type of
inconsistencies by periodically comparing BGP Adj_RIB_In and _Out counters.

On Thu, Dec 17, 2020 at 3:41 AM Enke Chen <>

> Hi, Folks:
> Regarding the patch for openBGPD pointed out by Job, I do not think it
> would work. When the TCP rcv window from the remote is 0, the BGP keepalive
> can still be queued to the socket buffer. It can take a long time for the
> socket buffer to be filled up by BGP keepalives.
> It seems that the TCP_USER_TIMEOUT option can be used for the persistent
> zero-size window issue.  The timeout value could be multiples of the
> holdtimer (with min and max adjustments), perhaps somewhere around 5 or 6
> minutes.
> Thanks.   -- Enke
> ----------
> Job Snijders <> Tue, 15 December 2020 21:54 UTC
> <>
> [snip]
> How to solve this? Claudio Jeker took a look at what it would take in
> OpenBGPD and came up with the (tiny!) following patch, should be
> readable to most:
> _______________________________________________
> Idr mailing list