[comp.protocols.tcp-ip.ibmpc] More on RFCs 1001 and 1002

glass@mica.berkeley.edu (Brett Glass) (03/17/89)

  In my original message, I cited a problem in the qualitative
descriptions in RFC 1001. I've since found similar problems in
RFC 1002, section 5.3.3 (NetBIOS DATAGRAM SERVICE PROTOCOLS:
RECEPTION OF NetBIOS DATAGRAMS BY ALL NODES). On Pages 78 and 79,
the pseudocode reads as follows:


   PROCEDURE datagram_packet(packet)

   /*
    * processing initiated by datagram packet reception
    * on B, P and M nodes
    */

...

[Code to validate packet and check for broadcast datagrams deleted]

...
             BEGIN /* non-broadcast */
                  /* Datagram for Unique or Group Name */

                  IF DESTINATION_NAME is not present in the
                     local name table THEN
                  BEGIN
                       /* destination not present */
                       build DATAGRAM ERROR packet, clear
                            FIRST and MORE bit, put in
                            this nodes IP and PORT, set
                            ERROR_CODE;
                       send DATAGRAM ERROR packet to
                            source IP address and port
                            of UDP;
                       discard UDP packet(s);
                       return;
                  END
                  ELSE
                  BEGIN /* good */
                       /*
                        * Replicate received NetBIOS datagram for
                        * each recipient
                        */
|                      FOR EACH pending NetBIOS user's receive
|                           datagram operation
|                      BEGIN
|                           IF source name of operation
|                              matches destination name
|                              of packet THEN
|                           BEGIN
|                              deliver USER_DATA from UDP
|                                packet(s);
                            END
                       END /* for each */
                       return;
                  END /* good */
             END /* non-broadcast */
            END /* datagram service */


The lines marked with vertical bars in the left margin are the
source of the problem. If they are implemented as-is -- and
there's a high probability that they will be -- incoming
non-broadcast datagrams will be unexpectedly received multiple
times by applications with several outstanding Receive Datagram
commands.

While the RFCs do not claim to be authoritative references on
the service protocols, they do describe them in sufficient detail
that many implementors will work directly from them and generate
erroneous interfaces. I therefore think that the information in
the RFCs should be amended to make sure the documented service
protocols are correct.

Several commercial software packages now on the market will not
handle this duplication, and will crash, hang, and/or corrupt
user files. To avoid such problems, and to promote acceptance of
the standard embodied in RFCs 1001 and 1002, I think it would be
worthwhile to change the documented behavior of the service
protocols.

--Brett