Libax25 procutils.c for NetRom local node
Hi Thomas,
I noticed that in libax25 the routine used to read /proc/net/nr_nodes only initialized local NetRom node name, alias and n parameters.
Quality and Obs parameters are not initialized.
FPAC node packet switch application is compatible with NetRom. When reading NetRom nodes list using the AX.25 library it is confused by the local node entries with zero Quality and Obs values.
When the node is broadcasting NetRom table it propagates local node parameters to other NetRom nodes, and Quality zero is also propagated over the network.
I patched read_proc_nr_nodes() in order to initialize local node quality = 255
obs (persist) = 6
w = 1
With the above local node initialized parameters, adjacent NetRom nodes can now modify and broadcast Quality and other link parameters. And we don't see NetRom node with zero quality in NetRom tables over the net.
Here is the patch :
procutils.c +4 -0
@@ -391,6 +391,10 @@if ((cp =nr_config_get_alias (name)) ==NULL )break ;safe_strncpy (new->alias, cp,6 ); + + new->w =1 ;/* local node w */ + new->qual1 =255 ;/* obviously, local node quality should be set to maximum value */ + new->obs1 =6 ;/* persist */ /* * n == 0 indicates a local node. */
73 de Bernard, f6bvp