All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernard Pidoux f6bvp <f6bvp@amsat.org>
To: Thomas Osterried DL9SAU <ax25@x-berg.in-berlin.de>
Cc: Ralf Baechle DL5RB <ralf@linux-mips.org>,
	linux-hams <linux-hams@vger.kernel.org>
Subject: Libax25 procutils.c for NetRom local node
Date: Tue, 11 May 2010 10:41:14 +0200	[thread overview]
Message-ID: <4BE9182A.5010406@amsat.org> (raw)

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 :

--- libax25-0.0.12-rc2/procutils.c	2009-11-26 18:37:42.000000000 +0100
+++ libax25-0.0.12-rc2/procutils.c	2010-05-11 01:19:35.005268719 +0200
@@ -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

                 reply	other threads:[~2010-05-11  8:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BE9182A.5010406@amsat.org \
    --to=f6bvp@amsat.org \
    --cc=ax25@x-berg.in-berlin.de \
    --cc=linux-hams@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.