Patch-ID# 100328-12 Keywords: x25 and x29 patch Synopsis: X.25 7.0: Fixes x25 and x29 bugs Date: 06/Nov/92 SunOS Release: 4.1.1, 4.1.2, 4.1.3 Unbundled Product: SunNet X.25 Unbundled Release: 7.0 Topic: 4.1.x fixes for x25 and x29 bugs BugId's fixed with this patch: 1056816 1050333 1063855 1050333 1056816 1063435 1063855 1065813 1068201 1071945 1072300 1072303 1074914 1074624 1073781 1073750 1073747 1069430 1073562 1073125 1073395 1066370 1063073 1073548 1071945 1074473 1076801 1076801 1075624 1096285 1095889 1103398 1095889 1086872 1096285 1098574 1100200 1103185 1104535 Changes incorporated in this version: 1095889 1086872 1096285 1098574 1100200 1103185 1104535 Architectures for which this patch is available: Sun3, Sun3x, Sun4, Sun4c, Sun4m Obsoleted by: Problem Description: *** PLEASE READ THIS CAREFULLY *** This latest version of the X.25 patch adds significant extra functionalities to meet customer requirements. Modifications have been made both to the kernel code and to a number of the user space programs (x25config, x25mgr, pad, x29). In most cases it will be necessary to install the WHOLE patch (ie. both user space and kernel files) or else problems will be encountered. Every effort has been made to ensure backward compatibility with the original release, and it is not anticipated that customer developed applications will be affected by these modifications. Note also that this patch includes ALL patches up to and including the previous revision. The changes made for this patch fall into a number of categories: 1. Bug Fixes ------------ These are in addition to the bug fixes available in earlier versions of the patch. 1095889: With the original version of the software, a Link Reset would always result in a Restart at the packet layer, which would clear all the Virtual Circuits using the link. This has now been made configurable by setting the following field in the /etc/sunlink/x25/x25params* file(s): # restart_on_reset {yes | no} # optional; default is yes The default option is "yes" in order to maintain backward compatibility. The user should be aware that not restarting the packet layer on a link reset may mean that some VCs may get into wrong states whenever a link reset occurs. This is because data in-transit may be lost at the link level and this may mean that one or more VCs may also lose data. Recovery of this situation may require the clearing of the VCs concerned. 1086872: The concept of the management socket (available in the X.25 6.0 product) has been re-introduced. A process started as root may register on the management socket and will receive a SIGURG signal if the link or packet layer change state. The precise event may be found by reading from the management socket. This mechanism is described in the documentation for X.25 6.0. Note that this only applies to Link 0 if it is a LAPB link. 1096285: The X25_WRITE_BUFFER_FULL ioctl() has been introduced to allow the select() function call to be used meaningfully when doing non-blocking writes to X.25. Note that this has been introduced to compensate for a deficiency in the socket code and not in X.25 itself. Previously, using a non-blocking socket, a write would return with EWOULDBLOCK if there was not sufficient space in the write buffer to accept the entire write. However, a select() done on the socket would return the socket as available for writing if there was any space available in the write buffer. The X.25 Programmer's Manual implied that the select() call would block until a low-water mark was reached, however, this was not implemented in the socket layer. Since the socket layer did not keep a record of whether not a previous write had blocked or not, and the changes had to be made to the X.25 code, then the fact that a write had blocked needed to be signaled to the X.25 code. This is the purpose of the X25_WRITE_BUFFER_FULL ioctl(). Whenever a write() returns with the EWOULDBLOCK error code, calling the X25_WRITE_BUFFER_FULL ioctl() will signal to the X.25 code that this event has occurred. The X.25 code will then set a low-water mark which is equal to half the high-water mark on the socket. A select() call will not return until this low water mark is reached. The X25_WRITE_BUFFER_FULL is called as follows: int so; (void) ioctl(so, X25_WRITE_BUFFER_FULL); As this ioctl() call may not be included in futher versions of the product, where flow control will be executed by other means, then in order to avoid having to rewrite the application, it is a good idea to ignore the return code. Note that the high water mark can be set using the X25_SBHIWAT ioctl() described on page xx of the X.25 Programmer's Manual. Note also that the mechanism will not appear to work if the size of the buffer written is comparable to the high water mark. It is recommended that the high water mark is at least 3 times the maximum that will be written at any time. 1098574: The 6.0 X25_RD_LCN_INFO ioctl() is supported. See the X.25 6.0 Programmer's Manual for details. 1100200: It is possible to leave the REJ state by receiving a RR or a RNR. 1103185: The header files are compliant with ANSI C. 1104535: The x29 program can support up to 256 pty's. 2. Enhancements --------------- Kernel space: - duplicate frames generated by the network are discarded. - the "Rejected command control" field of a FRMR frame is correctly encoded. User space: - the x25mgr deamon supports the collision resolution mechanism described in the ISO 8473 standard. This applies to OSI connections only. Configuration files: - a further new field in the /usr/sunlink/x25params? file(s) has been added. #interrupt_timeout # optional; default is 180 sec; # range is [0-255]. # limit the time spent to wait for a # "DCE interrupt confirmation" packet. This corresponds to the T26 timer in ISO8208. Whenever an Interrupt packet is sent this timer is started. If an Interrupt Confirm packet is not received before the timer expires, then the call is cleared. 3. Conformance -------------- Changes have been made to ensure LAPB conforms with the ISO 7776 standard, and X.25 is conformant with the ISO 8208 standard, according to the tests specified in the ISO8882 Abstract Test Suites. It is not anticipated that there will be significant interoperability problems with the changes made. However, in some situations the diagnostic codes returned in the case of error, and some other minor differences in behavior may be noted. 4. Previous jumbo patch included -------------------------------- PATCH 100328-11 for Bug 1103398 ------------------------------- PATCH 100328-10 for Bug 1095889 1096285 --------------------------------------- PATCH 100328-09 for Bug 1075624 ------------------------------- PATCH 100328-08 --------------- PATCH 100328-07 for Bug 1076801 ------------------------------- PATCH 100328-06 for Bug 1071945 1074473 1076801 ----------------------------------------------- PATCH 100328-05 for Bug 1074914 1074624 1073781 1073750 1073747 1069430 1073562 1073125 1073395 1066370 1063073 1073548 --------------------------------------------------------------- PATCH 100328-04 for Bug 1050333 1056816 1063435 1063855 1065813 1068201 1071945 1072300 1072303 --------------------------------------------------------------- PATCH 100328-02 for Bug 1063855 -------------------------------- PATCH 100328-01 for Bug 1056816 Rfe 1050333 ------------------------------------------- Install instructions: NOTE: If you have installed patch 100328-02, and haven't applied later patches, please de-install the patch by moving back the original object files, for example: cp /usr/sunlink/x25/sys/`arch -k`/OBJ/{x25_in.o,x25_out.o,x25_usrreq.o,x25_timer.o} /sys/`arch -k`/OBJ Installations: As root, Save old files: mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_fact.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_fact.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_in.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_in.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_init.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_init.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_ioctl.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_ioctl.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_kernel.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_kernel.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_lcn.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_lcn.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_listen.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_listen.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_llc2.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_llc2.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_out.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_out.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_proto.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_proto.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_pvc.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_pvc.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_route.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_route.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_stats.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_stats.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_std.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_std.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_timer.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_timer.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_tty.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_tty.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_usrreq.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_usrreq.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ/x25_util.o /usr/sunlink/x25/sys/`arch`/OBJ/x25_util.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/hdlc_ctl.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/hdlc_ctl.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/hdlc_in.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/hdlc_in.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/hdlc_out.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/hdlc_out.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/if_hdlc.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/if_hdlc.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/if_llc.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/if_llc.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/llc_input.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/llc_input.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/llc_proto.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/llc_proto.o.orig mv /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/llc_register.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc/llc_register.o.orig mv /usr/sunlink/x25/man/man8 /usr/sunlink/x25/man/man8.orig mv /usr/sunlink/x25/pad /usr/sunlink/x25/pad.orig mv /usr/sunlink/x25/hdlcconf /usr/sunlink/x25/hdlcconf.orig mv /usr/sunlink/x25/x25config /usr/sunlink/x25/x25config.orig mv /usr/sunlink/x25/x25mgr /usr/sunlink/x25/x25mgr.orig mv /usr/sunlink/x25/x25route /usr/sunlink/x25/x25route.orig mv /usr/sunlink/x25/x25trace /usr/sunlink/x25/x25trace.orig mv /usr/sunlink/x25/x29 /usr/sunlink/x25/x29.orig mv /usr/sunlink/x25/install.x25 /usr/sunlink/x25/install.x25.orig Install the new files: cp `arch`/x25_in.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_init.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_fact.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_ioctl.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_kernel.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_lcn.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_listen.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_llc2.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_out.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_proto.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_pvc.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_route.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_stats.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_std.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_timer.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_tty.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_usrreq.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/x25_util.o /usr/sunlink/x25/sys/`arch`/OBJ cp `arch`/hdlc_ctl.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc cp `arch`/hdlc_in.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc cp `arch`/hdlc_out.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc cp `arch`/if_hdlc.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc cp `arch`/if_llc.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc cp `arch`/llc_input.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc cp `arch`/llc_proto.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc cp `arch`/llc_register.o /usr/sunlink/x25/sys/`arch`/OBJ.netdlc cp man8/na.x25.8 /usr/sunlink/x25/man/man8 cp `arch`/{install.x25,hdlcconf,pad,x25config,x25mgr,x25route,x25trace,x29} /usr/sunlink/x25 Installing New Kernel: RUN *install.x25* script located in /usr/sunlink/x25 to rebuild a new kernel. ~