From: bernard pidoux <f6bvp@free.fr>
To: Linux netdev <netdev@vger.kernel.org>,
Linux Hams <linux-hams@vger.kernel.org>,
Ralf Baechle <ralf@linux-mips.org>,
David Miller <davem@davemloft.net>
Subject: [PATCH] [Resend] rose_loopback_timer sets VC number <= ROSE_DEFAULT_MAXVC
Date: Thu, 17 Dec 2009 16:25:18 +0100 [thread overview]
Message-ID: <1261063518.20057.22.camel@f6bvp-11> (raw)
[PATCH] [Resend] rose_loopback_timer sets VC number <= ROSE_DEFAULT_MAXVC
cat /proc/net/rose displayed a rose sockets abnormal lci value, i.e.
greater than maximum number of VCs per neighbour allowed.
This number prevents further test of lci value during rose operations.
Example (lines shortened) :
[bernard]# cat /proc/net/rose
dest_addr dest_call src_addr src_call dev lci neigh st vs vr va
* * 2080175520 F6BVP-1 rose0 000 00000 0 0 0 0
2080175520 FPAD-0 2080175520 WP-0 rose0 FFE 00001 3 0 0 0
Here are the default parameters :
linux/include/net/rose.h:#define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */
linux/net/rose/af_rose.c:int sysctl_rose_maximum_vcs = ROSE_DEFAULT_MAXVC;
With the following patch, rose_loopback_timer() attributes a VC number
within limits.
Signed-off-by: Bernard Pidoux <f6bvp@amsat.org>
---
net/rose/rose_loopback.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c
index 114df6e..968e8ba 100644
--- a/net/rose/rose_loopback.c
+++ b/net/rose/rose_loopback.c
@@ -75,7 +75,7 @@ static void rose_loopback_timer(unsigned long param)
lci_i = ((skb->data[0] << 8) & 0xF00) + ((skb->data[1] << 0) & 0x0FF);
frametype = skb->data[2];
dest = (rose_address *)(skb->data + 4);
- lci_o = 0xFFF - lci_i;
+ lci_o = ROSE_DEFAULT_MAXVC + 1 - lci_i;
skb_reset_transport_header(skb);
--
1.6.0.6
next reply other threads:[~2009-12-17 15:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 15:25 bernard pidoux [this message]
2010-01-04 5:21 ` [PATCH] [Resend] rose_loopback_timer sets VC number <= ROSE_DEFAULT_MAXVC 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=1261063518.20057.22.camel@f6bvp-11 \
--to=f6bvp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox