netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: ja@ssi.bg, netdev@vger.kernel.org, Yurij.Plotnikov@oktetlabs.ru
Subject: Re: [PATCH] ipv4: reset flowi parameters on route connect
Date: Sat, 04 Feb 2012 19:30:23 -0500 (EST)	[thread overview]
Message-ID: <20120204.193023.2287808303988988750.davem@davemloft.net> (raw)
In-Reply-To: <1328398416.2731.52.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 05 Feb 2012 00:33:36 +0100

> Le dimanche 05 février 2012 à 01:04 +0200, Julian Anastasov a écrit :
>> 	Eric Dumazet found that commit 813b3b5db83
>> (ipv4: Use caller's on-stack flowi as-is in output
>> route lookups.) that comes in 3.0 added a regression.
>> The problem appears to be that resulting flowi4_oif is
>> used incorrectly as input parameter to some routing lookups.
>> The result is that when connecting to local port without
>> listener if the IP address that is used is not on a loopback
>> interface we incorrectly assign RTN_UNICAST to the output
>> route because no route is matched by oif=lo. The RST packet
>> can not be sent immediately by tcp_v4_send_reset because
>> it expects RTN_LOCAL.
>> 
>> 	So, change ip_route_connect and ip_route_newports to
>> update the flowi4 fields that are input parameters because
>> we do not want unnecessary binding to oif.
>> 
>> 	To make it clear what are the input parameters that
>> can be modified during lookup and to show which fields of
>> floiw4 are reused add a new function to update the flowi4
>> structure: flowi4_update_output.
>> 
>> Thanks to Yurij M. Plotnikov for providing a bug report including a
>> program to reproduce the problem.
>> 
>> Thanks to Eric Dumazet for tracking the problem down to
>> tcp_v4_send_reset and providing initial fix.
>> 
>> Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
>> Signed-off-by: Julian Anastasov <ja@ssi.bg>
...
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks everyone.

      reply	other threads:[~2012-02-05  0:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-04 23:04 [PATCH] ipv4: reset flowi parameters on route connect Julian Anastasov
2012-02-04 23:33 ` Eric Dumazet
2012-02-05  0:30   ` 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=20120204.193023.2287808303988988750.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Yurij.Plotnikov@oktetlabs.ru \
    --cc=eric.dumazet@gmail.com \
    --cc=ja@ssi.bg \
    --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 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).