patch-2.2.13 linux/net/ipv4/icmp.c
Next file: linux/net/ipv4/ip_fw.c
Previous file: linux/net/ipv4/arp.c
Back to the patch index
Back to the overall index
- Lines: 69
- Date:
Tue Oct 19 17:14:02 1999
- Orig file:
v2.2.12/linux/net/ipv4/icmp.c
- Orig date:
Mon Aug 9 16:05:58 1999
diff -u --recursive --new-file v2.2.12/linux/net/ipv4/icmp.c linux/net/ipv4/icmp.c
@@ -3,7 +3,7 @@
*
* Alan Cox, <alan@redhat.com>
*
- * Version: $Id: icmp.c,v 1.52.2.2 1999/06/20 21:27:39 davem Exp $
+ * Version: $Id: icmp.c,v 1.52.2.3 1999/09/22 16:33:02 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -320,6 +320,8 @@
/* Control parameter - ignore bogus broadcast responses? */
int sysctl_icmp_ignore_bogus_error_responses =0;
+extern int sysctl_ip_always_defrag;
+
/*
* ICMP control array. This specifies what to do with each ICMP.
*/
@@ -537,10 +539,9 @@
* Now check at the protocol level
*/
if (!rt) {
-#ifndef CONFIG_IP_ALWAYS_DEFRAG
- if (net_ratelimit())
+ if (sysctl_ip_always_defrag == 0 &&
+ net_ratelimit())
printk(KERN_DEBUG "icmp_send: destinationless packet\n");
-#endif
return;
}
if (rt->rt_flags&(RTCF_BROADCAST|RTCF_MULTICAST))
@@ -698,7 +699,7 @@
break;
case ICMP_FRAG_NEEDED:
if (ipv4_config.no_pmtu_disc) {
- if (net_ratelimit())
+ if (sysctl_ip_always_defrag == 0 && net_ratelimit())
printk(KERN_INFO "ICMP: %d.%d.%d.%d: fragmentation needed and DF set.\n",
NIPQUAD(iph->daddr));
} else {
@@ -710,7 +711,7 @@
}
break;
case ICMP_SR_FAILED:
- if (net_ratelimit())
+ if (sysctl_ip_always_defrag == 0 && net_ratelimit())
printk(KERN_INFO "ICMP: %d.%d.%d.%d: Source Route Failed.\n", NIPQUAD(iph->daddr));
break;
default:
@@ -923,7 +924,7 @@
static void icmp_address(struct icmphdr *icmph, struct sk_buff *skb, int len)
{
#if 0
- if (net_ratelimit())
+ if (sysctl_ip_always_defrag == 0 && net_ratelimit())
printk(KERN_DEBUG "a guy asks for address mask. Who is it?\n");
#endif
}
@@ -953,8 +954,8 @@
if (mask == ifa->ifa_mask && inet_ifa_match(rt->rt_src, ifa))
return;
}
- if (net_ratelimit())
- printk(KERN_INFO "Wrong address mask %08lX from %08lX/%s\n",
+ if (sysctl_ip_always_defrag == 0 && net_ratelimit())
+ printk(KERN_INFO "Wrong address mask %08X from %08X/%s\n",
ntohl(mask), ntohl(rt->rt_src), dev->name);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)