From: Benjamin LaHaise <bcrl@kvack.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [net: stable request] dst->obsolete handling in 2.6.32-stable kernels - invalid cached routes never invalidated
Date: Sat, 13 Oct 2012 13:52:40 -0400 [thread overview]
Message-ID: <20121013175240.GK5453@kvack.org> (raw)
Hello David et al,
While investigating a problem on a 2.6.32 kernels (still present in 2.6.32.60)
where a change to an ipv4 route was not taking effect, I came across the
"dst->obsolete has become pointless" thread from November 2011 which is
related, eventually finding the problem fixed (or at least worked around) in
2.6.34 by "ipv4: check rt_genid in dst_check" aka
d11a4dc18bf41719c9f0d7ed494d295dd2973b92.
What I am seeing is that dst->obsolete is never being set for a cached
output route that becomes obsolete. For example, a cached route for
10.0.0.3 is never marked obsolete when the route for 10.0.0.3 is removed
from the routing table -- dst_check() and sk_dst_check() never invalidate
the cached dst because of the test for dst->obsolete (which remains 0).
Reproducing the issue is easily done:
# assuming eth0 has some ip and default route
ifconfig eth1 9.0.0.1/8
route add -host 10.0.0.3 gw 9.0.0.2 # assuming there is a 9.0.0.2
nc -u 10.0.0.3 1234
# <enter a few lines and note the packets sent to eth1 via 9.0.0.2>
# On another terminal, without exiting nc, delete the route to 10.0.0.3
route del -host 10.0.0.3 gw 9.0.0.2
# Go back to the first terminal and send a few more packets by
# entering another line or two to nc. Note the packets still go via
# eth1, even though they should now be transmitted via the default
# route on eth0.
To fix this bug, would it be possible to get commit
d11a4dc18bf41719c9f0d7ed494d295dd2973b92 queued up for 2.6.32-stable?
Setting dst.obsolete to -1 seems to be the least invasive way of fixing
this bug. Thanks a bunch,
-ben
--
"Thought is the essence of where you are now."
next reply other threads:[~2012-10-13 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-13 17:52 Benjamin LaHaise [this message]
2012-10-13 22:26 ` [net: stable request] dst->obsolete handling in 2.6.32-stable kernels - invalid cached routes never invalidated David Miller
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=20121013175240.GK5453@kvack.org \
--to=bcrl@kvack.org \
--cc=davem@davemloft.net \
--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