Messages in this thread Patch in this message | | | Date | Sat, 19 Oct 1996 20:43:03 -0400 (EDT) | From | Jon Lewis <> | Subject | Re: Ping with a 65510 bytes pack |
| |
On Sat, 19 Oct 1996, Bruno Kraychete da Costa wrote:
> It doesn't seem to work, Jon. I put the line above before put the big > packet in trash. Take a look on what I got ... The address returned seemd > to be kind of randomic. It should be 200.18.234.2. And I have only issued > two big pings ... why do the syslog points 3 attempts ?!
Ok...big red face...here's a version that does actually seem to work. It's lightly tested with my SMP linux 2.0.22 box and a coworker's Loser95 box.
Using it, I get info like: Oversized packet received from 205.229.58.128
I get the correct number of syslog entries. I suspect the problem with the first one was that you ended up feeding syslog garbage.
This will be really interesting to watch for in logs.
--- ip_fragment.c.orig Wed Aug 7 07:00:08 1996 +++ ip_fragment.c Sat Oct 19 20:33:42 1996 @@ -47,6 +47,8 @@ atomic_t ip_frag_mem = 0; /* Memory used for fragments */ +char *in_ntoa(unsigned long in); + /* * Memory Tracking Functions */ @@ -366,7 +368,7 @@ { NETDEBUG(printk("Invalid fragment list: Fragment over size.\n")); ip_free(qp); - frag_kfree_skb(skb,FREE_WRITE); + kfree_skb(skb,FREE_WRITE); ip_statistics.IpReasmFails++; return NULL; } @@ -466,6 +468,19 @@ return NULL; } } + + /* + * Attempt to construct an oversize packet. + */ + + if(ntohs(iph->tot_len)+(int)offset>65535) + { + skb->sk = NULL; + printk("Oversized packet received from %s\n",in_ntoa(qp->iph->saddr)); + frag_kfree_skb(skb, FREE_READ); + ip_statistics.IpReasmFails++; + return NULL; + } /* * Determine the position of this fragment.
------------------------------------------------------------------ Jon Lewis <jlewis@fdt.net> | Unsolicited commercial e-mail will Network Administrator | be proof-read for $199/hr. ________Finger jlewis@inorganic5.fdt.net for PGP public key_______
| |