Date sent:      	Thu, 25 Jun 1998 12:39:04 +0200 (CEST)
From:           	Hartwig Felger <hgfelger@vossnet.de>
Send reply to:  	Hartwig Felger <hgfelger@vossnet.de>
To:             	valja@TARTU.CUSTOMS.EE
Subject:        	Re: IPX over PPP

-----BEGIN PGP SIGNED MESSAGE-----

Salut Valentin,
On Thu, 25 Jun 1998 valja@TARTU.CUSTOMS.EE wrote:
> I have just same problem with IPX over PPP, than you described in 
> your letters to linux-ppp in April - when ipxcp layer come up before 
> ipcp, ipx fails. I have Debian Linux with kernel 2.0.33, pppd 2.3.5. 
> I tried now 2.0.34 kernel, but results was just same, than with 
> 2.0.33.
> 
> Are you solved this problem for you anyhow or have some additional 
> info about?
As I read in isdn4linux-group the Linux-kernel does a device-down, if the
IP-Adress should be changed. It is a Linux2.0-Problem, solved with 2.1.

I only have a workaround - so it's no proper solution, but it works!
The patch mentioned in this forwareded mail is the one, that makes it
possible for the pppd-2.3.[3-5] to successfully negotiate IPX.
- ---------------------FFFF-o<-------------------------

- From hgfelger@vossnet.de Thu Jun 25 12:34:44 1998
Date: Fri, 22 May 1998 23:49:53 +0200 (CEST)
From: Hartwig Felger <hgfelger@vossnet.de>
To: "Peter Henn, PD-PT-HW, -264" <Peter.Henn@ITK.DE>
Subject: Re: IPX over PPP connect not always

Salut Peter,
On Fri, 22 May 1998, Peter Henn, PD-PT-HW, -264 wrote:
> The questions:
> - Do you get a similar behaviour?
Ich kenne das - habe schon darber geschrieben. Die IPX-Verhandlung ist
kurz vor der IP- fertig. Wenn Du schnell genug zwischen drinn (ich habe
einen "Pieps" in beiden -up-Dateien) ifconfig aufrufst, wirst Du sehen,
da IPX ganz kurz steht. Nach der IP-Verhandlung, setzt der pppd das
IP-Protokoll auf das ppp0-Device. Wenn sich das seit dem letzten mal
gendert hat (z.B. weil es kein letztes mal gab -> 1. Einwahl nach
Neustart) wird bei Linux-2.0.xx das IPX-Protokoll vom Device gelscht. In
Linux 2.1 ist das gefixt. Da mir 2.1 aber nicht so ganz gefllt,

> - Do you have an idea what to do?
habe ich einen Workaround geschrieben. Ich wei leider nicht, was am
Kernel gendert werden mte.

Mein Hack merkt sich bei ipx-up, die Nummern und verwandelt das in ein
Shell-Script, um ggf. ipx neu aufzusetzen.

In ip-up wird geprft, ob IPX noch am Protokoll klebt, sonst wird unser
frisch angefertigtes Script gestartet.

Das Script wird nach Verwendung, oder in ipx-down gelscht, um bei einer
spteren nur IP-Verbindung nicht alte IPX-Leichen...

Da ppp0 keine Hardware-Adresse hat, mu die ausgehandelte Node-Adresse
manuell gesetz werden, wofr ipx_interface nicht ausgelegt ist:

1. Eine Modifikation von ipx_interface (aus ncpfs-2.0.12/ipx-1.0)
- -----------------o<-----------------
- --- ncpfs-2.0.12/ipx-1.0/ipx_interface.c	Thu Apr  9 20:31:22 1998
+++ ncpfs-2.0.12/ipx-1.0/h_ipx_interface.c	Thu Apr  9 20:31:06 1998
@@ -111,7 +111,7 @@
 		}
 	}

- -	if (((i = (argc - optind)) < 2) || (i > 3))
+	if (((i = (argc - optind)) < 2) || (i > 4))
 	{
 		usage();
 	}
@@ -140,6 +140,19 @@
 			}
 			sipx->sipx_network = htonl(netnum);
 			break;
+		case 3: /* hardy's node */
+		  {
+		    unsigned long node;
+		    int j;
+
+		    node=strtoul(argv[i],(char **) NULL, 16);
+		    for(j=5; j >= 0; --j)
+		      {
+			sipx->sipx_node[j]=node % 256;
+			node /= 256;
+		      }
+		  }
+		break;
 		}
 	}

- ----------------->o-----------------
Das resultiernde Binary habe ich als /usr/bin/ipx_interface_h installiert.

2.  -------in ipx-up einfgen-----------
# hardy's hack
echo "if /sbin/ifconfig $1 |grep -c IPX >/dev/null ; then true ; else " >/etc/p pp/ipx-wa
echo "/usr/bin/ipx_interface_h add $1 EtherII $4 $5" >> /etc/ppp/ipx-wa
echo fi >> /etc/ppp/ipx-wa
#/hardy's hack

3. --------in ipx-down------------
rm -f /etc/ppp/ipx-wa

4. --------in ip-up------
if [ -r /etc/ppp/ipx-wa ]; then
 /bin/bash /etc/ppp/ipx-wa
 rm /etc/ppp/ipx-wa
fi

>- Why does I found your patch not in the new sources?
> (also the newset pppd version 2.3.5 does not show this)
I'm upset too!!!

good luck! ;-)

1024/7A5EADED Hartwig Felger <hgfelger@vossnet.de> pgp-Key
fingerprint = 2F 3B 34 10 00 B7 FE 10 CE 84 E2 56 1C B0 3E 07 768/CA2159D9
Hartwig Felger <hgfelger@trick.informatik.uni-stuttgart.de> pgp-Key
fingerprint = 18 49 5E 6E 4E 47 3D F5 28 3E 11 C9 05 26 F3 46
- ------------------------->o--------------------------
1024/7A5EADED Hartwig Felger <hgfelger@vossnet.de>
pgp-Key fingerprint = 2F 3B 34 10 00 B7 FE 10  CE 84 E2 56 1C B0 3E 07
768/CA2159D9  Hartwig Felger <hgfelger@trick.informatik.uni-stuttgart.de>
pgp-Key fingerprint = 18 49 5E 6E 4E 47 3D F5  28 3E 11 C9 05 26 F3 46




-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1
Comment: Requires PGP version 2.6 or later.

iQCVAwUBNZIozug8bRR6Xq3tAQElYQP/QHuVxkUyGrwQzLAkuiR2NjOx3fXbSMU2
OfKSuvry1uNdD1CVv7jE5DSx4vAuQPSJi3qWZDZEOL0L/2/spxeZCBKbwH44tUFw
O/YViR1yj2vIh7YUVqPNFMjAzVMjfvWBGNSINy5eC1J8cmJwLqXce2W+EO7z5EmK
qr8Gref21l8=
=1KPP
-----END PGP SIGNATURE-----
