summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Osterried <thomas@osterried.de>2010-05-11 09:28:08 +0000
committerThomas Osterried <thomas@osterried.de>2010-05-11 09:28:08 +0000
commite820dc0abd4daa32e2df8c1f306b4d9051f445c0 (patch)
tree0b9399a811d0ccd670f9609bdde1cddbaa5b5712
parent45d3d4eafd4ebae34ca53841e9427b2091db387b (diff)
Patch by Bernard Pidoux f6bvp
He 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 were not initialized. He suggest to patch 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.
-rw-r--r--procutils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/procutils.c b/procutils.c
index de128d5..816fa40 100644
--- a/procutils.c
+++ b/procutils.c
@@ -391,6 +391,10 @@ struct proc_nr_nodes *read_proc_nr_nodes(void)
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.
*/