From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
netdev@vger.kernel.org, eyal.birger@gmail.com
Subject: net/ipv4/route.c: Routing anomaly introduced by 89aef89 (ipv4: Delete routing cache.)
Date: Mon, 8 Jul 2013 11:34:57 +0300 [thread overview]
Message-ID: <20130708113457.4a0d6023@pluto> (raw)
Hi,
In 89aef89 (ipv4: Delete routing cache) the following was removed from
ip_route_input_common (nowadays named ip_route_input_noref):
- tos &= IPTOS_RT_MASK;
As a side effect, the 'tos' argument passed to 'ip_route_input_slow' is
the "raw" u8, as present in iph->tos (opposed to the formerly "masked"
value).
This may affect the route calculation, as this value is later placed in
fl4.flowi4_tos for matching purposes (using equality to the tos stored
in the FIB Rule and/or Route).
(BTW, the question whether applying the historical IPTOS_RT_MASK
prior route lookup is interesting on its own...)
However, 89aef89 created an anomaly - since in the output path, routing
*still* uses the IPTOS_RT_MASK (see __ip_route_output_key for example).
It seems the omission of 'tos &= IPTOS_RT_MASK' from
'ip_route_input_noref' was accidental.
We should align input/output behavior by reverting the omission, or
alternatively we may reconsider the entire IPTOS_RT_MASK thing.
Regards,
Shmulik
next reply other threads:[~2013-07-08 8:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 8:34 Shmulik Ladkani [this message]
2013-07-09 5:43 ` net/ipv4/route.c: Routing anomaly introduced by 89aef89 (ipv4: Delete routing cache.) Julian Anastasov
2013-07-09 9:28 ` Shmulik Ladkani
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=20130708113457.4a0d6023@pluto \
--to=shmulik.ladkani@gmail.com \
--cc=davem@davemloft.net \
--cc=eyal.birger@gmail.com \
--cc=kuznet@ms2.inr.ac.ru \
--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.