## Automatically generated incremental diff
## From:   linux-2.0.40-rc7
## To:     linux-2.0.40-rc8
## Robot:  $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $

diff -urN linux-2.0.40-rc7/CREDITS linux-2.0.40-rc8/CREDITS
--- linux-2.0.40-rc7/CREDITS	2004-01-25 17:51:25.000000000 -0800
+++ linux-2.0.40-rc8/CREDITS	2004-01-25 17:51:25.000000000 -0800
@@ -386,7 +386,7 @@
 D: Extended support for loadable modules
 D: D-Link pocket adapter drivers
 S: Grevgatan 11
-S: S-114 53 Stockholm
+S: SE-114 53  STOCKHOLM
 S: Sweden
 
 N: Fritz Elfert
@@ -1257,7 +1257,7 @@
 D: Network layer debugging.
 D: Dial on demand facility (diald).
 S: Dag Hammerskjolds v. 3E
-S: S-226 64 LUND
+S: SE-226 64  LUND
 S: Sweden
 
 N: Henning P. Schmiedehausen
@@ -1552,7 +1552,7 @@
 D: Miscellaneous fixes
 D: Cleanup of the Config-files
 S: Västra Varmvattnet 63
-S: S-922 67  TAVELSJÖ
+S: SE-922 67  TAVELSJÖ
 S: Sweden
 
 N: Matt Welsh
diff -urN linux-2.0.40-rc7/Makefile linux-2.0.40-rc8/Makefile
--- linux-2.0.40-rc7/Makefile	2004-01-25 17:51:25.000000000 -0800
+++ linux-2.0.40-rc8/Makefile	2004-01-25 17:51:25.000000000 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 0
 SUBLEVEL = 40
-EXTRAVERSION =-rc7
+EXTRAVERSION =-rc8
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.0.40-rc7/drivers/net/ni65.c linux-2.0.40-rc8/drivers/net/ni65.c
--- linux-2.0.40-rc7/drivers/net/ni65.c	2004-01-25 17:51:25.000000000 -0800
+++ linux-2.0.40-rc8/drivers/net/ni65.c	2004-01-25 17:51:25.000000000 -0800
@@ -1115,7 +1115,7 @@
       memcpy((char *) p->tmdbounce[p->tmdbouncenum], (char *)skb->data,
                (skb->len > T_BUF_SIZE) ? T_BUF_SIZE : skb->len);
       if (len > skb->len)
-	      memset((char *)p->tmdbounce[p->tmdbouncenum] + skb->len, 0
+	      memset((char *)p->tmdbounce[p->tmdbouncenum] + skb->len, 0,
 		     len - skb->len);
       dev_kfree_skb (skb, FREE_WRITE);
 
diff -urN linux-2.0.40-rc7/drivers/net/rtl8139.c linux-2.0.40-rc8/drivers/net/rtl8139.c
--- linux-2.0.40-rc7/drivers/net/rtl8139.c	2004-01-25 17:51:25.000000000 -0800
+++ linux-2.0.40-rc8/drivers/net/rtl8139.c	2004-01-25 17:51:25.000000000 -0800
@@ -926,6 +926,7 @@
 		if (!(skb = skb_padto(skb, ETH_ZLEN))) {
 			clear_bit(0, (void *)&dev->tbusy);
 			return 0;
+		}
 	}
 
 	/* Calculate the next Tx descriptor entry. */
diff -urN linux-2.0.40-rc7/net/core/skbuff.c linux-2.0.40-rc8/net/core/skbuff.c
--- linux-2.0.40-rc7/net/core/skbuff.c	2004-01-25 17:51:25.000000000 -0800
+++ linux-2.0.40-rc8/net/core/skbuff.c	2004-01-25 17:51:25.000000000 -0800
@@ -4,24 +4,27 @@
  *	Authors:	Alan Cox <iiitac@pyr.swan.ac.uk>
  *			Florian La Roche <rzsfl@rz.uni-sb.de>
  *
- *	Fixes:	
- *		Alan Cox	:	Fixed the worst of the load balancer bugs.
- *		Dave Platt	:	Interrupt stacking fix.
- *	Richard Kooijman	:	Timestamp fixes.
- *		Alan Cox	:	Changed buffer format.
- *		Alan Cox	:	destructor hook for AF_UNIX etc.
- *		Linus Torvalds	:	Better skb_clone.
- *		Alan Cox	:	Added skb_copy.
+ *	Fixes:
+ *		Alan Cox	:	Fixed the worst of the load
+ *					balancer bugs
+ *		Dave Platt	:	Interrupt stacking fix
+ *	Richard Kooijman	:	Timestamp fixes
+ *		Alan Cox	:	Changed buffer format
+ *		Alan Cox	:	destructor hook for AF_UNIX etc
+ *		Linus Torvalds	:	Better skb_clone
+ *		Alan Cox	:	Added skb_copy
  *		Alan Cox	:	Added all the changed routines Linus
  *					only put in the headers
  *		Ray VanTassle	:	Fixed --skb->lock in free
  *	Michael Deutschmann	:	Corrected and expanded
- *					CONFIG_SKB_CHECK system.
+ *					CONFIG_SKB_CHECK system
+ *	        David Weinehall :	Attempt to pad skb's properly
+ *	        			(partial backport form 2.2.25)
  *
  *	TO FIX:
  *		The __skb_ routines ought to check interrupts are disabled
  *	when called, and bitch like crazy if not. Unfortunately I don't think
- *	we currently have a portable way to check if interrupts are off - 
+ *	we currently have a portable way to check if interrupts are off -
  *	Linus ???
  *
  *	This program is free software; you can redistribute it and/or
@@ -848,13 +851,16 @@
 	struct sk_buff *n;
 
 	IS_SKB(skb);
-	n = kmalloc(sizeof(*n), priority);
-	if (!n)
+
+	if (!(n = kmalloc(sizeof (*n), priority)))
 		return NULL;
-	memcpy(n, skb, sizeof(*n));
+
+	memcpy(n, skb, sizeof (*n));
 	n->count = 1;
+
 	if (skb->data_skb)
 		skb = skb->data_skb;
+
 	atomic_inc(&skb->count);
 	atomic_inc(&net_allocs);
 	atomic_inc(&net_skbcount);
@@ -866,13 +872,14 @@
 	n->tries = 0;
 	n->lock = 0;
 	n->users = 0;
+
 	return n;
 }
 
 /*
- *	This is slower, and copies the whole data area 
+ *	This is slower, and copies the whole data area
  */
- 
+
 struct sk_buff *skb_copy(struct sk_buff *skb, int priority)
 {
 	struct sk_buff *n;
@@ -881,55 +888,55 @@
 	/*
 	 *	Allocate the copy buffer
 	 */
-	 
+
 	IS_SKB(skb);
-	
-	n=alloc_skb(skb->truesize-sizeof(struct sk_buff),priority);
-	if(n==NULL)
+
+	if (!(n = alloc_skb(skb->truesize - sizeof (struct sk_buff), priority)))
 		return NULL;
 
 	/*
 	 *	Shift between the two data areas in bytes
 	 */
-	 
-	offset=n->head-skb->head;
+
+	offset = n->head - skb->head;
 
 	/* Set the data pointer */
-	skb_reserve(n,skb->data-skb->head);
+	skb_reserve(n, skb->data - skb->head);
 	/* Set the tail pointer and length */
-	skb_put(n,skb->len);
+	skb_put(n, skb->len);
 	/* Copy the bytes */
-	memcpy(n->head,skb->head,skb->end-skb->head);
-	n->link3=NULL;
-	n->list=NULL;
-	n->sk=NULL;
-	n->when=skb->when;
-	n->dev=skb->dev;
-	n->h.raw=skb->h.raw+offset;
-	n->mac.raw=skb->mac.raw+offset;
-	n->ip_hdr=(struct iphdr *)(((char *)skb->ip_hdr)+offset);
-	n->saddr=skb->saddr;
-	n->daddr=skb->daddr;
-	n->raddr=skb->raddr;
-	n->seq=skb->seq;
-	n->end_seq=skb->end_seq;
-	n->ack_seq=skb->ack_seq;
-	n->acked=skb->acked;
-	memcpy(n->proto_priv, skb->proto_priv, sizeof(skb->proto_priv));
-	n->used=skb->used;
-	n->free=1;
-	n->arp=skb->arp;
-	n->tries=0;
-	n->lock=0;
-	n->users=0;
-	n->pkt_type=skb->pkt_type;
-	n->stamp=skb->stamp;
+	memcpy(n->head, skb->head, skb->end - skb->head);
+	n->link3 = NULL;
+	n->list = NULL;
+	n->sk = NULL;
+	n->when = skb->when;
+	n->dev = skb->dev;
+	n->h.raw = skb->h.raw+offset;
+	n->mac.raw = skb->mac.raw+offset;
+	n->ip_hdr = (struct iphdr *)(((char *)skb->ip_hdr) + offset);
+	n->saddr = skb->saddr;
+	n->daddr = skb->daddr;
+	n->raddr = skb->raddr;
+	n->seq = skb->seq;
+	n->end_seq = skb->end_seq;
+	n->ack_seq = skb->ack_seq;
+	n->acked = skb->acked;
+	memcpy(n->proto_priv, skb->proto_priv, sizeof (skb->proto_priv));
+	n->used = skb->used;
+	n->free = 1;
+	n->arp = skb->arp;
+	n->tries = 0;
+	n->lock = 0;
+	n->users = 0;
+	n->pkt_type = skb->pkt_type;
+	n->stamp = skb->stamp;
 
 	IS_SKB(n);
+
 	return n;
 }
 
-struct sk_buff *skb_copy_grow(struct sk_buff *skb, int pad, int gfp_mask)
+static struct sk_buff *skb_copy_grow(struct sk_buff *skb, int pad, int priority)
 {
 	struct sk_buff *n;
 	unsigned long offset;
@@ -938,14 +945,16 @@
 	 *	Allocate the copy buffer
 	 */
 
-	if (!(n = alloc_skb(skb->end - skb->head + pad, gfp_mask)))
+	IS_SKB(skb);
+
+	if (!(n = alloc_skb(skb->truesize - sizeof (struct sk_buff) + pad, priority)))
 		return NULL;
 
 	/*
 	 *	Shift between the two data areas in bytes
 	 */
 
-	offset = n->head-skb->head;
+	offset = n->head - skb->head;
 
 	/* Set the data pointer */
 	skb_reserve(n, skb->data - skb->head);
@@ -953,27 +962,33 @@
 	skb_put(n, skb->len);
 	/* Copy the bytes */
 	memcpy(n->head, skb->head, skb->end - skb->head);
-	n->csum = skb->csum;
+	n->link3 = NULL;
 	n->list = NULL;
 	n->sk = NULL;
+	n->when = skb->when;
 	n->dev = skb->dev;
-	n->priority = skb->priority;
-	n->protocol = skb->protocol;
-	n->dst = dst_clone(skb->dst);
-	n->h.raw = skb->h.raw + offset;
-	n->nh.raw = skb->nh.raw + offset;
-	n->mac.raw = skb->mac.raw + offset;
-	memcpy(n->cb, skb->cb, sizeof (skb->cb));
+	n->h.raw = skb->h.raw+offset;
+	n->mac.raw = skb->mac.raw+offset;
+	n->ip_hdr = (struct iphdr *)(((char *)skb->ip_hdr) + offset);
+	n->saddr = skb->saddr;
+	n->daddr = skb->daddr;
+	n->raddr = skb->raddr;
+	n->seq = skb->seq;
+	n->end_seq = skb->end_seq;
+	n->ack_seq = skb->ack_seq;
+	n->acked = skb->acked;
+	memcpy(n->proto_priv, skb->proto_priv, sizeof (skb->proto_priv));
 	n->used = skb->used;
-	n->is_clone = 0;
-	atomic_set(&n->users, 1);
+	n->free = 1;
+	n->arp = skb->arp;
+	n->tries = 0;
+	n->lock = 0;
+	n->users = 0;
 	n->pkt_type = skb->pkt_type;
 	n->stamp = skb->stamp;
-	n->destructor = NULL;
-	n->security = skb->security;
-#ifdef CONFIG_IP_FIREWALL
-        n->fwmark = skb->fwmark;
-#endif
+
+	IS_SKB(n);
+
 	return n;
 }
 
@@ -988,9 +1003,11 @@
 	}
 
 	nskb = skb_copy_grow(skb, pad, GFP_ATOMIC);
-	kfree_skb(skb);
+	kfree_skb(skb, FREE_WRITE);
+
 	if (nskb)
 		memset(nskb->data + nskb->len, 0, pad);
+
 	return nskb;
 }
 
diff -urN linux-2.0.40-rc7/net/ipv4/ip_forward.c linux-2.0.40-rc8/net/ipv4/ip_forward.c
--- linux-2.0.40-rc7/net/ipv4/ip_forward.c	2004-01-25 17:51:25.000000000 -0800
+++ linux-2.0.40-rc8/net/ipv4/ip_forward.c	2004-01-25 17:51:25.000000000 -0800
@@ -364,7 +364,7 @@
 				icmp_send(skb, ICMP_DEST_UNREACH,
 					  ICMP_FRAG_NEEDED,
 					  htonl(dev2->mtu + premasq_len_diff),
-					  dev);
+					  dev, 1);
 			else
 #endif
 			icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
diff -urN linux-2.0.40-rc7/net/unix/af_unix.c linux-2.0.40-rc8/net/unix/af_unix.c
--- linux-2.0.40-rc7/net/unix/af_unix.c	2004-01-25 17:51:25.000000000 -0800
+++ linux-2.0.40-rc8/net/unix/af_unix.c	2004-01-25 17:51:26.000000000 -0800
@@ -4,7 +4,7 @@
  * Authors:	Alan Cox, <alan@cymru.net>
  *
  *		Currently this contains all but the file descriptor passing code.
- *		Before that goes in the odd bugs in the iovec handlers need 
+ *		Before that goes in the odd bugs in the iovec handlers need
  *		fixing, and this bit testing. BSD fd passing is not a trivial part
  *		of the exercise it turns out. Anyone like writing garbage collectors.
  *
@@ -34,6 +34,8 @@
  *		Jon Nelson,
  *		Alan Cox,
  *		David Weinehall	:	Fix possible memory-leaks
+ *	Michael Deutschmann	:	Fix fd-passing semantics to
+ *					match what OpenSSH expects.
  *
  * Known differences from reference BSD that was tested:
  *
@@ -796,7 +798,10 @@
 	fp = (struct file **)(skb->h.filp+sizeof(long));
 
 	if (cmnum > fdnum)
+	{
 		cmnum = fdnum;
+		cmsg->cmsg_len = sizeof(struct cmsghdr) + sizeof(int) * fdnum;
+	}
 
 	/*
 	 *	Copy those that fit
@@ -863,7 +868,7 @@
 	int sent=0;
 	struct file *fp[UNIX_MAX_FD];
 	/* number of fds waiting to be passed, 0 means either
-	 * no fds to pass or they've already been passed 
+	 * no fds to pass or they've already been passed
 	 */
 	int fpnum=0;
 
@@ -1086,20 +1091,15 @@
 	{
 		cm=unix_copyrights(msg->msg_control,
 			msg->msg_controllen);
-		if(cm==NULL || msg->msg_controllen<sizeof(struct cmsghdr)
-#if 0
-/*		investigate this further -- Stevens example doesn't seem to care */
-		||
-		   cm->cmsg_type!=SCM_RIGHTS ||
-		   cm->cmsg_level!=SOL_SOCKET ||
-		   msg->msg_controllen!=cm->cmsg_len
-#endif
-		)
+		if(cm==NULL || msg->msg_controllen<sizeof(struct cmsghdr))
 		{
 			kfree(cm);
 /*			printk("recvmsg: Bad msg_control\n");*/
 			return -EINVAL;
 		}
+		cm->cmsg_type = SCM_RIGHTS;
+		cm->cmsg_level = SOL_SOCKET;
+		cm->cmsg_len = msg->msg_controllen;
 	}
 
 	down(&sk->protinfo.af_unix.readsem);		/* Lock the socket */
diff -urN linux-2.0.40-rc7/scripts/lxdialog/menubox.c linux-2.0.40-rc8/scripts/lxdialog/menubox.c
--- linux-2.0.40-rc7/scripts/lxdialog/menubox.c	1998-11-15 10:33:24.000000000 -0800
+++ linux-2.0.40-rc8/scripts/lxdialog/menubox.c	2004-01-25 17:51:26.000000000 -0800
@@ -29,7 +29,7 @@
 static void
 print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey)
 {
-    int i, j;
+    int j;
     char menu_item[menu_width+1];
 
     strncpy(menu_item, item, menu_width);
@@ -40,8 +40,11 @@
     wattrset (win, menubox_attr);
     wmove (win, choice, 0);
 #if OLD_NCURSES
-    for (i = 0; i < menu_width; i++)
-	waddch (win, ' ');
+    {
+        int i;
+        for (i = 0; i < menu_width; i++)
+	    waddch (win, ' ');
+    }
 #else
     wclrtoeol(win);
 #endif
diff -urN linux-2.0.40-rc7/scripts/lxdialog/textbox.c linux-2.0.40-rc8/scripts/lxdialog/textbox.c
--- linux-2.0.40-rc7/scripts/lxdialog/textbox.c	1998-11-15 10:33:24.000000000 -0800
+++ linux-2.0.40-rc8/scripts/lxdialog/textbox.c	2004-01-25 17:51:26.000000000 -0800
@@ -451,7 +451,7 @@
 static void
 print_line (WINDOW * win, int row, int width)
 {
-    int i, y, x;
+    int y, x;
     char *line;
 
     line = get_line ();
@@ -463,8 +463,11 @@
     getyx (win, y, x);
     /* Clear 'residue' of previous line */
 #if OLD_NCURSES
-    for (i = 0; i < width - x; i++)
-	waddch (win, ' ');
+    {
+        int i;
+        for (i = 0; i < width - x; i++)
+	    waddch (win, ' ');
+    }
 #else
     wclrtoeol(win);
 #endif
