patch-2.4.19 linux-2.4.19/net/packet/af_packet.c

Next file: linux-2.4.19/net/rose/af_rose.c
Previous file: linux-2.4.19/net/netsyms.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/net/packet/af_packet.c linux-2.4.19/net/packet/af_packet.c
@@ -355,6 +355,8 @@
 	if (dev->hard_header) {
 		skb->data -= dev->hard_header_len;
 		skb->tail -= dev->hard_header_len;
+		if (len < dev->hard_header_len)
+			skb->nh.raw = skb->data;
 	}
 
 	/* Returns -EFAULT on error */
@@ -1660,7 +1662,7 @@
 			pg_vec[i] = __get_free_pages(GFP_KERNEL, order);
 			if (!pg_vec[i])
 				goto out_free_pgvec;
-
+			memset((void *)(pg_vec[i]), 0, PAGE_SIZE << order);
 			pend = virt_to_page(pg_vec[i] + (PAGE_SIZE << order) - 1);
 			for (page = virt_to_page(pg_vec[i]); page <= pend; page++)
 				SetPageReserved(page);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)