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