Hi David,
On Jun 29, 2020, at 9:44 PM, David Moylan <djm at
wiz.net.au> wrote:
Hi John,
This is amazing news. I have been unable to use DECnet under Linux for a very long time
as the implementation was broken.
The last time I saw DECnet for Linux working was back in the Ubuntu 14 timeframe. Nothing
modern worked at all with the end result usually being the entire VM locking as soon as
you went to initiate any form of DECnet connection (this required a power cycle or reset
to recover).
Mostly it seems to have been a case of benign neglect - a new feature/function is added to
the kernel and someone modifies the DECnet code to make sure it still compiles but there?s
no-one around to do any testing.
I did some research and it looked like no-one was
maintaining the code. I saw a few attempts from a few people to resurge this, but I could
never get their code trees to compile.
I noticed in the readme that you?ve previously used this with Debian Buster 10 which puts
this in a similar space to Ubuntu 18.04 Bionic, but your comments said ?Due to kernel
changes, the above no longer work.?
So should I be able to use your kernel module code under Ubuntu 18.04 (running kernel
4.15.0 or similar) or has something recently broken?
The code as it stands today will probably not even compile with a 4.15.0 tree - all of my
building/testing has been done on 4.19 and 5.4. Since writing the above note about ?kernel
changes? I?ve had to figure out the Linux versioning macros. It should be pretty easy to
back out that particular change and add a version check - it?s only two calls to a kernel
routine which added an extra argument which DECnet doesn?t use. The harder problem is
finding out which version made the change. With these changes, there?s a good chance that
it will work on 4.15 although no guarantees! Let me know if you want me to make those
changes.
John.
Cheers, Wiz!!
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE] On Behalf Of
John Forecast
Sent: Tuesday, 30 June 2020 10:45 AM
To: hecnet at update.uu.se
Subject: [HECnet] DECnet for Linux Bug Fixes
Recently I have found, and fixed, a number of bugs in the DECnet for Linux kernel module.
Some of
these bugs may be relevant for members of this mailing list who are using DECnet for
Linux,
especially on a Raspberry Pi.
Major bugs fixed:
- Ethernet Listen Timer was not implemented
In addition, the check for an address change for the designated router (DR) was
missing
although there was a check if the DR?s priority had changed.
Note: this code changes the format of /proc/net/decnet_dev to include the
listen timer value.
nml/nml2 needs to be rebuilt to understand the changed format.
- System panic when using the loopback device (lo)
The DECnet code was missing a destructor routine which is used to avoid data
copying.
- The neighbour (adjacent node) code could be broken by kernel changes
The code made use of a now deprecated feature (zero length array at the end of
a structure)
in order to access data in a surrounding structure. This happened to work ?by
chance?
until kernel 5.4.42 on 32-bit processors.
- Interrupt message flow control was broken
The flow control was a mixture of using the SEND/DONTSEND status of the data
subchannel and a message count. This seems to work between Linux systems but is
broken
when communicating with other systems - during the life of a logical link, the
remote system
could only send a single interrupt message while the Linux system could pretty
much send
as many interrupts as it wanted possibly overrunning the remote systems
buffers.
- Optional data on received connect confirm message was corrupted
The code was getting the optional data from the wrong offset in the message.
- Next hop cache problem
30 seconds after a logical link was taken down, the next hop cache entry was
deleted. As
part of this deletion, the link was taken ?down? which caused a neighbour entry
to be
created for the same node address but accessed via the loopback device.
Sometimes this
would cause the designated router to become accessible via the loopback device
and
subsequent connections would fail.
- Intra-ethernet bit ignored
The intra-ethernet bit in the routing flags is ignored on inbound traffic. If
there was a neighbour
entry for the remote node at connection time, everything would work correctly.
If there wad no
entry, all outbound traffic would be sent through the designated router for
the duration of
the logical link.
- Promiscuous mode alters DECnet behaviour
If the ethernet NIC used for DECnet had promiscuous mode enabled (e.g. using
tcpdump
for traffic tracing), the DECnet code would start seeing endnode hello?s,
populating
neighbour structures and causing the problems described above for the
intra-ethernet bit
to go away.
New programs:
DECnet Test Send and DECnet Test Receiver (DTS/DTR)
Test programs created via reverse engineering the protocol exchanges. Used to
find a
number of the bugs described above.
NML2
New implementation of the Network Management Listener. Supports SUMMARY,
STATUS
and CHARACTERISTICS for NODES, CIRCUITS and AREAS. It does not support LINKS
and OBJECTS which were in the old version but are system specific operations
which
were only visible from DECnet-VMS systems.
The old version is still the default during installation. The new version can
be installed by:
cd dnprogs/nml2
make
sudo make install
which will overwrite the installed executable and man page.
OS Support:
As of 06/29/2020 the code has been tested with:
Raspbian 2020-05-27 release with kernels 4.19.126 and 5.4.44
(32-bit only)
Pi OS 2020-05-27 32-bit release with kernel 4.19.126 and 5.4.44
pI OS 2020-05-27 (fully updated on 06/26/2020) with kernel 5.4.49
The source code and installation instructions are available at:
<https://github.com/JohnForecast/RaspbianDECnet
<https://github.com/JohnForecast/RaspbianDECnet>>
John.