All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Benjamin Poirier <bpoirier@nvidia.com>, David Ahern <dsahern@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next] doc: Document unexpected tcp_l3mdev_accept=1 behavior
Date: Fri, 20 Aug 2021 11:06:34 -0600	[thread overview]
Message-ID: <5254c616-dc21-1e41-9923-59aade8a4731@gmail.com> (raw)
In-Reply-To: <20210819083854.156996-1-bpoirier@nvidia.com>

On 8/19/21 2:38 AM, Benjamin Poirier wrote:
> As suggested by David, document a somewhat unexpected behavior that results
> from net.ipv4.tcp_l3mdev_accept=1. This behavior was encountered while
> debugging FRR, a VRF-aware application, on a system which used
> net.ipv4.tcp_l3mdev_accept=1 and where TCP connections for BGP with MD5
> keys were failing to establish.
> 
> Cc: David Ahern <dsahern@gmail.com>
> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
> ---
>  Documentation/networking/vrf.rst | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/Documentation/networking/vrf.rst b/Documentation/networking/vrf.rst
> index 0dde145043bc..0a9a6f968cb9 100644
> --- a/Documentation/networking/vrf.rst
> +++ b/Documentation/networking/vrf.rst
> @@ -144,6 +144,19 @@ default VRF are only handled by a socket not bound to any VRF::
>  netfilter rules on the VRF device can be used to limit access to services
>  running in the default VRF context as well.
>  
> +Using VRF-aware applications (applications which simultaneously create sockets
> +outside and inside VRFs) in conjunction with ``net.ipv4.tcp_l3mdev_accept=1``
> +is possible but may lead to problems in some situations. With that sysctl
> +value, it is unspecified which listening socket will be selected to handle
> +connections for VRF traffic; ie. either a socket bound to the VRF or an unbound
> +socket may be used to accept new connections from a VRF. This somewhat
> +unexpected behavior can lead to problems if sockets are configured with extra
> +options (ex. TCP MD5 keys) with the expectation that VRF traffic will
> +exclusively be handled by sockets bound to VRFs, as would be the case with
> +``net.ipv4.tcp_l3mdev_accept=0``. Finally and as a reminder, regardless of
> +which listening socket is selected, established sockets will be created in the
> +VRF based on the ingress interface, as documented earlier.
> +
>  --------------------------------------------------------------------------------
>  
>  Using iproute2 for VRFs
> 

Reviewed-by: David Ahern <dsahern@kernel.org>


I don't have the cycles right now, but if you or someone else has time
it would be good to look at ways to improve the current situation.

      reply	other threads:[~2021-08-20 17:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  8:38 [PATCH net-next] doc: Document unexpected tcp_l3mdev_accept=1 behavior Benjamin Poirier
2021-08-20 17:06 ` David Ahern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5254c616-dc21-1e41-9923-59aade8a4731@gmail.com \
    --to=dsahern@gmail.com \
    --cc=bpoirier@nvidia.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.