MAC address bug fix for 0.3.3

Ivo Timmermans zarq at zebra.icicle.yi.org
Fri Feb 11 01:25:01 CET 2000


The MAC addresses of a packet on the receiving end of a tunnel are
wrong with 0.3.3, apply the following patch to net.c to correct that.


--- net.c.old	Tue Feb  8 00:35:38 2000
+++ net.c	Fri Feb 11 00:50:57 2000
@@ -80,8 +80,8 @@
   p->len +=3D 12;
   tmp[0] =3D tmp[6] =3D 0xfe;
   tmp[1] =3D tmp[7] =3D 0xfd;
-  *((ip_t*)(&tmp[2])) =3D *((ip_t*)(&tmp[30]));  /* !!  ?? */
-  *((ip_t*)(&tmp[8])) =3D (ip_t)(htonl(myself->vpn_ip));
+  *((ip_t*)(&tmp[2])) =3D (ip_t)(htonl(myself->vpn_ip));
+  *((ip_t*)(&tmp[8])) =3D *((ip_t*)(&tmp[26]));
   memcpy(p->data, &tmp[0], p->len);
 }
 


-- 
Ivo Timmermans

You are just jealous because the little voices are talking to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://brouwer.uvt.nl/pipermail/tinc/attachments/20000211/297ccb8f/attachment.pgp


More information about the Tinc mailing list