Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dsa@cumulusnetworks.com
Cc: rshearma@brocade.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] net: Avoid receiving packets with an l3mdev on unbound UDP sockets
Date: Mon, 30 Jan 2017 15:01:14 -0500 (EST)	[thread overview]
Message-ID: <20170130.150114.249644236631741676.davem@davemloft.net> (raw)
In-Reply-To: <e5618218-0de4-6bb6-1bb8-9e53e0ecb183@cumulusnetworks.com>

From: David Ahern <dsa@cumulusnetworks.com>
Date: Mon, 30 Jan 2017 11:52:01 -0700

> On 1/26/17 11:02 AM, Robert Shearman wrote:
>> Packets arriving in a VRF currently are delivered to UDP sockets that
>> aren't bound to any interface. TCP defaults to not delivering packets
>> arriving in a VRF to unbound sockets. IP route lookup and socket
>> transmit both assume that unbound means using the default table and
>> UDP applications that haven't been changed to be aware of VRFs may not
>> function correctly in this case since they may not be able to handle
>> overlapping IP address ranges, or be able to send packets back to the
>> original sender if required.
>> 
>> So add a sysctl, udp_l3mdev_accept, to control this behaviour with it
>> being analgous to the existing tcp_l3mdev_accept, namely to allow a
>> process to have a VRF-global listen socket. Have this default to off
>> as this is the behaviour that users will expect, given that there is
>> no explicit mechanism to set unmodified VRF-unaware application into a
>> default VRF.
>> 
>> Signed-off-by: Robert Shearman <rshearma@brocade.com>
>> ---
>> I've targetted this for the net tree because I believe the expected
>> behaviour is different enough from the current behaviour to be
>> considered a bug. However, this should also apply to the net-next tree
>> as-is if this not deemed a bug.
> 
> Does not apply to net-next; collision in sysctl_net_ipv4.c
> 
> As for the code change, I have updated my unit tests and they all pass with this patch. Not sure why I marked my version as not working last November, but it is all good now.
> 
> Acked-by: David Ahern <dsa@cumulusnetworks.com>
> Tested-by: David Ahern <dsa@cumulusnetworks.com>

The conflict was easy enough to fix up, so I did it myself.

Applied to net-next, thanks.

  reply	other threads:[~2017-01-30 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 18:02 [PATCH net] net: Avoid receiving packets with an l3mdev on unbound UDP sockets Robert Shearman
2017-01-26 18:12 ` David Ahern
2017-01-30 18:52 ` David Ahern
2017-01-30 20:01   ` David Miller [this message]
2017-01-30 20:06     ` Robert Shearman

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=20170130.150114.249644236631741676.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=rshearma@brocade.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox