lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <17849.64125.710251.587076@robur.slu.se>
Date:	Fri, 26 Jan 2007 13:56:29 +0100
From:	Robert Olsson <Robert.Olsson@...a.slu.se>
To:	David Miller <davem@...emloft.net>
Cc:	Robert.Olsson@...a.slu.se, ebiederm@...ssion.com,
	netdev@...r.kernel.org, robert.olsson@....uu.se
Subject: Re: [PATCH] net: Fix the fib trie iterator to work with a single
 entry routing tables


David Miller writes:

 > > Yes the case when the trie is just a single leaf got wrong with the
 > > iterator and your patchs cures it. I think we have a similar problem
 > > with /proc/net/fib_trie
 > 
 > I'm happy to review a fix for that :-)
 
When main table is just a single leaf this gets printed as belonging to the 
local table in /proc/net/fib_trie. A fix is below.

Cheers.
						--ro


Signed-off-by: Robert Olsson <robert.olsson@....uu.se>


--- net-2.6.20/net/ipv4/fib_trie.c.orig	2007-01-26 13:18:13.000000000 +0100
+++ net-2.6.20/net/ipv4/fib_trie.c	2007-01-26 13:19:36.000000000 +0100
@@ -2290,16 +2290,17 @@
 	if (v == SEQ_START_TOKEN)
 		return 0;
 
+	if (!NODE_PARENT(n)) {
+		if (iter->trie == trie_local)
+			seq_puts(seq, "<local>:\n");
+		else
+			seq_puts(seq, "<main>:\n");
+	} 
+
 	if (IS_TNODE(n)) {
 		struct tnode *tn = (struct tnode *) n;
 		__be32 prf = htonl(MASK_PFX(tn->key, tn->pos));
 
-		if (!NODE_PARENT(n)) {
-			if (iter->trie == trie_local)
-				seq_puts(seq, "<local>:\n");
-			else
-				seq_puts(seq, "<main>:\n");
-		} 
 		seq_indent(seq, iter->depth-1);
 		seq_printf(seq, "  +-- %d.%d.%d.%d/%d %d %d %d\n",
 			   NIPQUAD(prf), tn->pos, tn->bits, tn->full_children, 
 

 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ