netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dsahern@kernel.org
Cc: netdev@vger.kernel.org, lberger@labn.net,
	renato@opensourcerouting.org, dsahern@gmail.com
Subject: Re: [PATCH net] net/tcp: Fix socket lookups with SO_BINDTODEVICE
Date: Wed, 20 Jun 2018 08:04:38 +0900 (KST)	[thread overview]
Message-ID: <20180620.080438.1744443807544218914.davem@davemloft.net> (raw)
In-Reply-To: <20180618193037.3365-1-dsahern@kernel.org>

From: dsahern@kernel.org
Date: Mon, 18 Jun 2018 12:30:37 -0700

> From: David Ahern <dsahern@gmail.com>
> 
> Similar to 69678bcd4d2d ("udp: fix SO_BINDTODEVICE"), TCP socket lookups
> need to fail if dev_match is not true. Currently, a packet to a given port
> can match a socket bound to device when it should not. In the VRF case,
> this causes the lookup to hit a VRF socket and not a global socket
> resulting in a response trying to go through the VRF when it should it.
                                                                      ^^^

"not", I fixed this up for you.

> Fixes: 3fa6f616a7a4d ("net: ipv4: add second dif to inet socket lookups")
> Fixes: 4297a0ef08572 ("net: ipv6: add second dif to inet6 socket lookups")
> Reported-by: Lou Berger <lberger@labn.net>
> Diagnosed-by: Renato Westphal <renato@opensourcerouting.org>
> Tested-by: Renato Westphal <renato@opensourcerouting.org>
> Signed-off-by: David Ahern <dsahern@gmail.com>

Applied and queued up for -stable, thanks.

      reply	other threads:[~2018-06-19 23:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 19:30 [PATCH net] net/tcp: Fix socket lookups with SO_BINDTODEVICE dsahern
2018-06-19 23:04 ` David Miller [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=20180620.080438.1744443807544218914.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=lberger@labn.net \
    --cc=netdev@vger.kernel.org \
    --cc=renato@opensourcerouting.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).