netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net/ipv4/route.c: Routing anomaly introduced by 89aef89 (ipv4: Delete routing cache.)
@ 2013-07-08  8:34 Shmulik Ladkani
  2013-07-09  5:43 ` Julian Anastasov
  0 siblings, 1 reply; 3+ messages in thread
From: Shmulik Ladkani @ 2013-07-08  8:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: Alexey Kuznetsov, netdev, eyal.birger

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-09  9:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-08  8:34 net/ipv4/route.c: Routing anomaly introduced by 89aef89 (ipv4: Delete routing cache.) Shmulik Ladkani
2013-07-09  5:43 ` Julian Anastasov
2013-07-09  9:28   ` Shmulik Ladkani

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).