From: Andrew Hendry <ahendry@tusc.com.au>
To: eis@baty.hanse.de
Cc: linux-x25@vger.kernel.org, trivial@rustcorp.com.au
Subject: [PATCH] - Trivial 2.6.8.1 /proc/net/x25/route is infinite when x25 routes > 0
Date: Fri, 20 Aug 2004 17:09:32 +1000 [thread overview]
Message-ID: <1092985772.2292.447.camel@ahendry> (raw)
When displaying x25 routes:
route add --x25 1234/2 eth0
route add --x25 4321/2 eth0
cat /proc/net/x25/route
Is infinite
This patch makes x25_get_route_idx the same as x25_get_socket_idx which
works correctly. Applies to 2.6.8.1 and probably much older.
Andrew.
diff -up linux-2.6.8.1/net/x25/x25_proc.c.orig
linux-2.6.8.1/net/x25/x25_proc.c
--- linux-2.6.8.1/net/x25/x25_proc.c.orig 2004-08-20
17:02:43.311326384 +1000
+++ linux-2.6.8.1/net/x25/x25_proc.c 2004-08-20 16:38:42.491364312
+1000
@@ -32,10 +32,11 @@ static __inline__ struct x25_route *x25_
list_for_each(route_entry, &x25_route_list) {
rt = list_entry(route_entry, struct x25_route, node);
- if (--pos)
- break;
+ if (!pos--)
+ goto found;
}
-
+ rt = NULL;
+found:
return rt;
}
reply other threads:[~2004-08-20 7:09 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=1092985772.2292.447.camel@ahendry \
--to=ahendry@tusc.com.au \
--cc=eis@baty.hanse.de \
--cc=linux-x25@vger.kernel.org \
--cc=trivial@rustcorp.com.au \
/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.