Re: Full IPX support y/n ?

David Woodhouse (
Fri, 27 Feb 1998 12:28:59 +0000

This is a multipart MIME message.

Content-Type: text/plain; charset=us-ascii said:
> I've got ncpmount and ipxd to work, but the other utils don't - they
> don't seem to be able to authenticate properly.

Fixed. The do_ncp_call was peeking at the header of the packet before
receiving it into the buffer. It was using the length returned from the
_first_ recvfrom() call to return to the client. This was only the length of
the buffer provided, rather than the length of the message.

I suspect this might be a kernel bug - the man page for recvfrom(2) says:
All three routines return the length of the message on
successful completion. If a message is too long to fit in
the supplied buffer, excess bytes may be discarded depend-
ing on the type of socket the message is received from
(see socket(2)).

This implies that the return value from the MSG_PEEK when the buffer is
smaller than the message should be what the ncplib code expected, and what I
presume it got in 2.0.x: the length of the _message_, not the number of bytes
placed in the buffer.

On the subject of the ncp utilities - can anyone tell me why the
ncp_send_broadcast() call restricts the length of the message to 58 bytes? I
have had no ill effects from increasing this.

Content-Type: text/plain ; name="ncpfs-2.1.1-lengthfix"; charset=us-ascii
Content-Description: ncpfs-2.1.1-lengthfix
Content-Disposition: attachment; filename="ncpfs-2.1.1-lengthfix"

--- ncpfs-2.1.1/lib/ncplib.c Fri Feb 27 12:11:03 1998
+++ ncpfs-2.1.1.glibc/lib/ncplib.c Wed Feb 25 19:58:22 1998
@@ -347,8 +347,9 @@
0, 1, &err);
goto re_select;
- conn->reply_size = ipx_recv(conn->ncp_sock, conn->packet, NCP_PACKET_SIZE,
+ ipx_recv(conn->ncp_sock, conn->packet, NCP_PACKET_SIZE,
0, 1, &err);
+ conn->reply_size = len;
return 0;

Content-Type: text/plain; charset=us-ascii

---- ---- ----
David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355
finger for PGP key.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to