[1283] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: Solution for dosemu disconnecting during ipx/novell sessions.

daemon@ATHENA.MIT.EDU (Ales Dryak)
Sun Oct 29 01:41:11 1995

Date: Sun, 29 Oct 1995 00:29:56 +0100
From: Ales Dryak <A.Dryak@sh.cvut.cz>
To: Alan Cox <alan@cymru.net>
cc: linux-msdos@vger.rutgers.edu, linux-net@vger.rutgers.edu
In-Reply-To: <199510281739.SAA02947@snowcrash.cymru.net>

Hi,

On Sat, 28 Oct 1995, Alan Cox wrote:

> > If you have multiple dos sessions, with multiple novell sessions open
> > between the linux box and the novell server, they time out
> > independently.
> > 
> > ipx is normally a dos tsr, rather than a linux kernel service.
> > 
> > netx is a dos tsr, but it's not handling this situation.
> > 
> 
> What happens is this. Every idle period the Novell machine sends a single
> '?' in a frame to the next port up from the NCP and messages port (ie if
> your NCP port is 0x7000 the message port is 0x7001 and the keepalive port
> is 0x87002).

Novell sends not one but two bytes in each watchdog frame. Here is the 
format:

/* values for signature charater */
#define IPX_WDOG_POOL_INACTIVE		('?') /* server -> client */
#define IPX_WDOG_SESSION_VALID		('Y') /* client -> server: OK */
#define IPX_WDOG_NO_VALID_SESSION	('N') /* client -> server: 
                      invalid  e.g. after crash, reboot and new login*/

typedef
struct tagWatchDogPacket
{
/* connection id */
	byte	cid		__attribute__((packed));
/* signature character */
	byte	sign_char	__attribute__((packed));
} WatchDogPacket;

> 
> The client gets its own node number for the source and sends back a frame
> with either a Y or N in it. If you dump the and strace the frames the
> DOS IPX layer gets the wrong node address and sends back a faulty
???
I've tested get internetwork address call to IPX and it works OK.
--- on dosemu 0.60.2 - you may have different version.
 
> keepalive from NETX.COM. I think the bug is in the IPX emulation of
> DOSemu.
> 
> Its actually quite nasty because in theory you could generate an 'N' 
> from a wrong address that is a different session.
> 
> Alan
> 

I analyzed the dosemu watchdog problem and it seems I found the cause.
The watchdog packets aren't delivered to nw shell so it cannot answer.
The bug is in the dosemu IPX emulation - if there is no network activity
the IPX code never takes control, no recvfrom call occurs and incoming 
packets are left in the socket kernel receive queue.
To verify the above theory I've written a simple DOS program, which only 
periodically call ipx relinquish control. I start it after login and all 
connections keep alive.

So there are two ways to fix the watchdog problem.

1) a dos tsr, which calls periodically ipx relinquish control

2) fix it inside dosemu IPX code

I suggest to fix it inside dosemu. 

Ales Dryak


home help back first fref pref prev next nref lref last post