patch-2.1.68 linux/net/ipv4/ip_fragment.c
Next file: linux/net/ipv4/ip_fw.c
Previous file: linux/net/ipv4/ip_forward.c
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Sun Nov 30 14:00:39 1997
- Orig file:
v2.1.67/linux/net/ipv4/ip_fragment.c
- Orig date:
Wed Nov 12 13:34:28 1997
diff -u --recursive --new-file v2.1.67/linux/net/ipv4/ip_fragment.c linux/net/ipv4/ip_fragment.c
@@ -5,7 +5,7 @@
*
* The IP fragmentation functionality.
*
- * Version: $Id: ip_fragment.c,v 1.26 1997/09/04 22:35:00 davem Exp $
+ * Version: $Id: ip_fragment.c,v 1.29 1997/11/22 12:31:05 freitag Exp $
*
* Authors: Fred N. van Kempen <waltje@uWalt.NL.Mugnet.ORG>
* Alan Cox <Alan.Cox@linux.org>
@@ -130,7 +130,7 @@
/* Find the correct entry in the "incomplete datagrams" queue for
* this IP datagram, and return the queue entry address if found.
*/
-static inline struct ipq *ip_find(struct iphdr *iph)
+static inline struct ipq *ip_find(struct iphdr *iph, struct dst_entry *dst)
{
__u16 id = iph->id;
__u32 saddr = iph->saddr;
@@ -314,7 +314,8 @@
len = qp->ihlen + qp->len;
if(len>65535) {
- printk(KERN_INFO "Oversized IP packet from %d.%d.%d.%d.\n", NIPQUAD(qp->iph->saddr));
+ if (net_ratelimit())
+ printk(KERN_INFO "Oversized IP packet from %d.%d.%d.%d.\n", NIPQUAD(qp->iph->saddr));
ip_statistics.IpReasmFails++;
ip_free(qp);
return NULL;
@@ -322,7 +323,7 @@
if ((skb = dev_alloc_skb(len)) == NULL) {
ip_statistics.IpReasmFails++;
- NETDEBUG(printk(KERN_ERR "IP: queue_glue: no memory for gluing queue %p\n", qp));
+ NETDEBUG(printk(KERN_ERR "IP: queue_glue: no memory for gluing queue %p\n", qp));
ip_free(qp);
return NULL;
}
@@ -390,7 +391,7 @@
ip_evictor();
/* Find the entry of this IP datagram in the "incomplete datagrams" queue. */
- qp = ip_find(iph);
+ qp = ip_find(iph, skb->dst);
/* Is this a non-fragmented datagram? */
offset = ntohs(iph->frag_off);
@@ -435,7 +436,8 @@
/* Attempt to construct an oversize packet. */
if(ntohs(iph->tot_len)+(int)offset>65535) {
- printk(KERN_INFO "Oversized packet received from %d.%d.%d.%d\n", NIPQUAD(iph->saddr));
+ if (net_ratelimit())
+ printk(KERN_INFO "Oversized packet received from %d.%d.%d.%d\n", NIPQUAD(iph->saddr));
frag_kfree_skb(skb, FREE_READ);
ip_statistics.IpReasmFails++;
return NULL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov