lkml.org 
[lkml]   [1996]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectICMP REDIRECTs
In the file net/ipv4/ip_forward.c, it says that you do not have to forward
a frame on the interface that it arrived upon. Is it okay if someone
wants to forward a frame on the same interface and disable the ICMP
REDIRECTs ?

1. It may be needed when you have more than one router on the same cable
and you want to set the default routes to only one router. One can,
though, argue against such a situation, but it can happen.

2. The situation may arise where one may want to set up default routes to
a single host, IP masquerade and let all the connection to appear
from this host.

The following are the lines in ip_forward.c

#ifndef CONFIG_IP_NO_ICMP_REDIRECT
if (dev == dev2 &&
!((iph->saddr^dev->pa_addr)&dev->pa_mask) &&
/* The daddr!=raddr test isn't obvious - what its
* do is avoiding sending a frame the receiver
* will not believe anyway.. */
iph->daddr != raddr/*ANK*/ && !opt->srr)
icmp_send(skb, ICMP_REDIRECT,
ICMP_REDIR_HOST, raddr, dev);
#endif

3. Is it okay, if I define CONFIG_IP_NO_ICMP_REDIRECT in the file
/usr/src/linux/include/net/ip_masq.h as

#ifndef CONFIG_IP_NO_ICMP_REDIRECT
#define CONFIG_IP_NO_ICMP_REDIRECT
#endif

to accomplish the desired effect for the point 2 ?

What could be the implications ? Serious ?

/Madhu





\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.064 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site