patch-1.3.7 linux/net/ipv4/icmp.c
Next file: linux/net/ipv4/ip.c
Previous file: linux/net/ipv4/arp.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Thu Jul 6 14:04:42 1995
- Orig file:
v1.3.6/linux/net/ipv4/icmp.c
- Orig date:
Fri Jun 30 16:22:31 1995
diff -u --recursive --new-file v1.3.6/linux/net/ipv4/icmp.c linux/net/ipv4/icmp.c
@@ -32,6 +32,7 @@
* Stefan Becker : ICMP redirects in icmp_send().
* Peter Belding : Tightened up ICMP redirect handling
* Alan Cox : Tightened even more.
+ * Arnt Gulbrandsen: Misplaced #endif with net redirect and break
*
*
*
@@ -213,7 +214,7 @@
len = dev->hard_header_len + sizeof(struct iphdr) + sizeof(struct icmphdr) +
sizeof(struct iphdr) + 32; /* amount of header to return */
- skb = (struct sk_buff *) alloc_skb(len, GFP_ATOMIC);
+ skb = (struct sk_buff *) alloc_skb(len+15, GFP_ATOMIC);
if (skb == NULL)
{
icmp_statistics.IcmpOutErrors++;
@@ -380,8 +381,8 @@
#ifdef not_a_good_idea
ip_rt_add((RTF_DYNAMIC | RTF_MODIFIED | RTF_GATEWAY),
ip, 0, icmph->un.gateway, dev,0, 0, 0);
- break;
#endif
+ break;
case ICMP_REDIR_HOST:
/*
* Add better route to host.
@@ -434,7 +435,7 @@
icmp_statistics.IcmpOutEchoReps++;
icmp_statistics.IcmpOutMsgs++;
- size = dev->hard_header_len + 64 + len;
+ size = dev->hard_header_len + 64 + len + 15;
skb2 = alloc_skb(size, GFP_ATOMIC);
if (skb2 == NULL)
@@ -508,7 +509,7 @@
/* correct answers are possible for everything >= 12 */
}
- size = dev->hard_header_len + 84;
+ size = dev->hard_header_len + 84 + 15;
if (! (skb2 = alloc_skb(size, GFP_ATOMIC)))
{
@@ -599,7 +600,7 @@
icmp_statistics.IcmpOutMsgs++;
icmp_statistics.IcmpOutAddrMaskReps++;
- size = dev->hard_header_len + 64 + len;
+ size = dev->hard_header_len + 64 + len + 15;
skb2 = alloc_skb(size, GFP_ATOMIC);
if (skb2 == NULL)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this