netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] route: fix ICMP secure_redirects
@ 2011-11-07 15:41 Flavio Leitner
  2011-11-07 18:35 ` David Miller
  0 siblings, 1 reply; 11+ messages in thread
From: Flavio Leitner @ 2011-11-07 15:41 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Flavio Leitner

It should accept ICMP redirects from any host and not
just from gateways when secure_redirects is disabled.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
---
 net/ipv4/route.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 155138d..dd6937ec 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1347,7 +1347,8 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
 				continue;
 
 			if (rt->dst.error || rt->dst.dev != dev ||
-			    rt->rt_gateway != old_gw) {
+			    (IN_DEV_SEC_REDIRECTS(in_dev) &&
+			    rt->rt_gateway != old_gw)) {
 				ip_rt_put(rt);
 				continue;
 			}
-- 
1.7.6

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

end of thread, other threads:[~2011-11-17 21:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-07 15:41 [PATCH] route: fix ICMP secure_redirects Flavio Leitner
2011-11-07 18:35 ` David Miller
2011-11-07 19:05   ` Flavio Leitner
2011-11-08  0:03     ` [PATCH] route: add more relaxed option for secure_redirects Flavio Leitner
2011-11-12  1:33       ` David Miller
2011-11-16 20:46         ` Flavio Leitner
2011-11-16 22:02           ` David Miller
2011-11-16 23:17             ` Flavio Leitner
2011-11-17  1:40               ` Flavio Leitner
2011-11-17  1:41                 ` David Miller
2011-11-17 21:53                 ` David Miller

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