patch-2.2.13 linux/net/ipv4/ip_input.c
Next file: linux/net/ipv4/ip_masq.c
Previous file: linux/net/ipv4/ip_fw.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Tue Oct 19 17:14:02 1999
- Orig file:
v2.2.12/linux/net/ipv4/ip_input.c
- Orig date:
Thu Apr 22 19:45:19 1999
diff -u --recursive --new-file v2.2.12/linux/net/ipv4/ip_input.c linux/net/ipv4/ip_input.c
@@ -154,6 +154,7 @@
struct ip_mib ip_statistics={2,IPDEFTTL,}; /* Forwarding=No, Default TTL=64 */
+int sysctl_ip_always_defrag = 0;
/*
* Handle the issuing of an ioctl() request
@@ -170,11 +171,6 @@
}
}
-
-#if defined(CONFIG_IP_TRANSPARENT_PROXY) && !defined(CONFIG_IP_ALWAYS_DEFRAG)
-#define CONFIG_IP_ALWAYS_DEFRAG 1
-#endif
-
/*
* 0 - deliver
* 1 - block
@@ -235,18 +231,17 @@
unsigned char hash;
int flag = 0;
-#ifndef CONFIG_IP_ALWAYS_DEFRAG
/*
* Reassemble IP fragments.
*/
- if (iph->frag_off & htons(IP_MF|IP_OFFSET)) {
+ if (sysctl_ip_always_defrag == 0 &&
+ (iph->frag_off & htons(IP_MF|IP_OFFSET))) {
skb = ip_defrag(skb);
if (!skb)
return 0;
iph = skb->nh.iph;
}
-#endif
#ifdef CONFIG_IP_MASQUERADE
/*
@@ -443,16 +438,15 @@
__skb_trim(skb, len);
}
-#ifdef CONFIG_IP_ALWAYS_DEFRAG
/* Won't send ICMP reply, since skb->dst == NULL. --RR */
- if (iph->frag_off & htons(IP_MF|IP_OFFSET)) {
+ if (sysctl_ip_always_defrag != 0 &&
+ iph->frag_off & htons(IP_MF|IP_OFFSET)) {
skb = ip_defrag(skb);
if (!skb)
return 0;
iph = skb->nh.iph;
ip_send_check(iph);
}
-#endif
#ifdef CONFIG_FIREWALL
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)