]> git.baikalelectronics.ru Git - kernel.git/commit
route: fix ICMP redirect validation
authorFlavio Leitner <fbl@redhat.com>
Mon, 24 Oct 2011 06:56:38 +0000 (02:56 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Oct 2011 06:56:38 +0000 (02:56 -0400)
commit6e48fcc7185c910026c3d3167143dc4941f75f9b
tree0820f1a9de3a2b1a81913550056518c21950e7f8
parent8a8d02a2a77f9b26bff8208f0bf48628fc8e284f
route: fix ICMP redirect validation

The commit edfa3a08778424d127997dd810041a34c094ae35
(ipv4: Cache learned redirect information in inetpeer.)
removed some ICMP packet validations which are required by
RFC 1122, section 3.2.2.2:
...
  A Redirect message SHOULD be silently discarded if the new
  gateway address it specifies is not on the same connected
  (sub-) net through which the Redirect arrived [INTRO:2,
  Appendix A], or if the source of the Redirect is not the
  current first-hop gateway for the specified destination (see
  Section 3.3.1).

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c