diff options
author | Roland McGrath <roland@gnu.org> | 2000-02-05 12:13:22 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-02-05 12:13:22 +0000 |
commit | 1a7ccb577c414677f9e763036d6ccce3a298f16d (patch) | |
tree | 10f45d0745e0f65108ecbda92ed6f7214dc703ff /pfinet/linux-src/net/ipv4/ip_input.c | |
parent | add1cad493c256d0a7c939070f9ee067c2718daf (diff) | |
parent | b39cd08347c72483a4521a55301a0fa147a2a2b1 (diff) |
Merge from vendor branch Linux:
Import of Linux 2.2.13 subset (ipv4 stack and related)
Diffstat (limited to 'pfinet/linux-src/net/ipv4/ip_input.c')
-rw-r--r-- | pfinet/linux-src/net/ipv4/ip_input.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/pfinet/linux-src/net/ipv4/ip_input.c b/pfinet/linux-src/net/ipv4/ip_input.c index 7a3e2618..b1725fa3 100644 --- a/pfinet/linux-src/net/ipv4/ip_input.c +++ b/pfinet/linux-src/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 @@ int ip_ioctl(struct sock *sk, int cmd, unsigned long arg) } } - -#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 @@ int ip_local_deliver(struct sk_buff *skb) 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 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) __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 /* |