[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Source-Route on local ring



Here's a patch from Roger Wolf for IPX to work on oltr:
He had to insert code to copy the NIC's hwaddr to outgoing packets.
It's not in the official oltr release yet, but it will be.

--gilbert

-- 
Gilbert Ramirez                Voice:  +1 210 358 4032
Technical Services             Fax:    +1 210 358 1122
University Health System       San Antonio, Texas, USA


diff -u -r1.22 -r1.23
--- oltr_d.c    1998/01/18 15:27:49     1.22
+++ oltr_d.c    1998/05/11 10:31:28     1.23
@@ -58,6 +58,10 @@
  * Revision history:
  *
  * $Log: oltr_d.c,v $
+ * Revision 1.23  1998/05/11 10:31:28  wolff
+ * Now correctly sends packets with OUR source address. Especially good news
+ * for IPX users.
+ *
  * Revision 1.22  1998/01/18 15:27:49  wolff
  * Removed outdated comment.
  *
@@ -156,7 +160,7 @@
  *
  * */
 
-#define RCS_ID "$Id: oltr_d.c,v 1.22 1998/01/18 15:27:49 wolff Exp $"
+#define RCS_ID "$Id: oltr_d.c,v 1.23 1998/05/11 10:31:28 wolff Exp $"
 
 
 /* 
@@ -2105,6 +2109,14 @@
     memcpy (skb_put (skb, tmpskb->len), tmpskb->data, tmpskb->len);
     Tprintk ("j");
   }
+
+  /* It seems that packets delivered here with source address set to 0. */
+  /* Lets fill it in.... */
+  if (skb->data[8] & 0x80) {
+    memcpy (skb->data + 8, dev->dev_addr, dev->addr_len);
+    skb->data[8] |= 0x80;
+  } else
+    memcpy (skb->data + 8, dev->dev_addr, dev->addr_len);
 
 #ifdef TWO_ZERO
   tf.FragmentCount = 2;