All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernard F6BVP <f6bvp@free.fr>
To: ralf@linux-mips.org
Cc: davem@davemloft.net, linux-hams@vger.kernel.org,
	netdev@vger.kernel.org, bpidoux@free.fr
Subject: [PATCH] [ROSE] rose node number was never decreased
Date: Fri, 27 Aug 2010 00:15:01 +0200	[thread overview]
Message-ID: <4C76E765.9020201@free.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

When a ROSE node was deleted, node number was not
decremented and addr kept going up when a new node
was added.

/proc/net/rose_neigh
addr  callsign  dev  count use mode restart  t0  tf digipeaters
00007 F5KBW-9   ax0      1   0  DTE      no   0   0
00006 F6BVP-11  ax0      2   0  DTE      no   0   0
00005 F6BVP-9   ax0      2   0  DTE      no   0   0
00001 RSLOOP-0  ???      0   0  DCE     yes   0   0

With this patch, rose node number is correctly decreased
when nodes are deleted and new ones added :

/proc/net/rose_neigh
addr  callsign  dev  count use mode restart  t0  tf digipeaters
00004 F5KBW-9   ax0      1   0  DTE      no   0   0
00003 F6BVP-11  ax0      2   0  DTE      no   0   0
00002 F6BVP-9   ax0      2   0  DTE      no   0   0
00001 RSLOOP-0  ???      0   0  DCE     yes   0   0

Signed-off-by: Bernard Pidoux <f6bvp@free.fr>




[-- Attachment #2: rose_route.patch --]
[-- Type: text/x-patch, Size: 427 bytes --]

--- a/net/rose/rose_route.c	2010-08-13 22:44:56.000000000 +0200
+++ b/net/rose/rose_route.c	2010-08-26 15:11:13.000000000 +0200
@@ -240,6 +240,7 @@
 			ax25_cb_put(rose_neigh->ax25);
 		kfree(rose_neigh->digipeat);
 		kfree(rose_neigh);
+		rose_neigh_no--;
 		return;
 	}
 
@@ -250,6 +251,7 @@
 				ax25_cb_put(rose_neigh->ax25);
 			kfree(rose_neigh->digipeat);
 			kfree(rose_neigh);
+			rose_neigh_no--;
 			return;
 		}
 


             reply	other threads:[~2010-08-26 22:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 22:15 Bernard F6BVP [this message]
2010-08-26 23:09 ` [PATCH] [ROSE] rose node number was never decreased David Miller

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=4C76E765.9020201@free.fr \
    --to=f6bvp@free.fr \
    --cc=bpidoux@free.fr \
    --cc=davem@davemloft.net \
    --cc=linux-hams@vger.kernel.org \
    --cc=netdev@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.