patch-1.3.20 linux/net/netrom/nr_in.c

Next file: linux/net/unix/af_unix.c
Previous file: linux/net/netrom/nr_dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.19/linux/net/netrom/nr_in.c linux/net/netrom/nr_in.c
@@ -68,11 +68,16 @@
 		skbn->free = 1;
 		skbn->arp  = 1;
 		skbn->sk   = sk;
-		sk->rmem_alloc += skb->truesize;
-			
+		sk->rmem_alloc += skbn->truesize;
+		skbn->h.raw = skbn->data;
+
+		skbo = skb_dequeue(&sk->nr->frag_queue);
+		memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
+		kfree_skb(skbo, FREE_READ);
+
 		while ((skbo = skb_dequeue(&sk->nr->frag_queue)) != NULL) {
+			skb_pull(skbo, NR_NETWORK_LEN + NR_TRANSPORT_LEN);
 			memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
-
 			kfree_skb(skbo, FREE_READ);
 		}
 
@@ -93,9 +98,9 @@
 
 		case NR_CONNACK:
 			nr_calculate_rtt(sk);
-			sk->window         = skb->data[5];
-			sk->nr->your_index = skb->data[2];
-			sk->nr->your_id    = skb->data[3];
+			sk->window         = skb->data[20];
+			sk->nr->your_index = skb->data[17];
+			sk->nr->your_id    = skb->data[18];
 			sk->nr->t1timer    = 0;
 			sk->nr->t2timer    = 0;
 			sk->nr->t4timer    = 0;
@@ -170,8 +175,8 @@
 	unsigned short nr, ns;
 	int queued = 0;
 
-	nr = skb->data[3];
-	ns = skb->data[2];
+	nr = skb->data[18];
+	ns = skb->data[17];
 
 	switch (frametype) {
 
@@ -276,7 +281,7 @@
 			do {
 				save_vr = sk->nr->vr;
 				while ((skbn = skb_dequeue(&sk->nr->reseq_queue)) != NULL) {
-					ns = skbn->data[2];
+					ns = skbn->data[17];
 					if (ns == sk->nr->vr) {
 						if (nr_queue_rx_frame(sk, skbn, frametype & NR_MORE_FLAG) == 0) {
 							sk->nr->vr = (sk->nr->vr + 1) % NR_MODULUS;
@@ -328,7 +333,7 @@
 
 	del_timer(&sk->timer);
 
-	frametype = skb->data[4];
+	frametype = skb->data[19];
 
 	switch (sk->nr->state)
 	{

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected] with Sam's (original) version
of this