diff mbox

ipv4: do not ignore route errors

Message ID 201103252345.p2PNjP1n025209@ja.ssi.bg
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Julian Anastasov March 25, 2011, 11:45 p.m. UTC
The "ipv4: Inline fib_semantic_match into check_leaf"
change forgets to return the route errors. check_leaf should
return the same results as fib_table_lookup.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
---
 net/ipv4/fib_trie.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

Comments

David Miller March 26, 2011, 3:33 a.m. UTC | #1
From: Julian Anastasov <ja@ssi.bg>
Date: Sat, 26 Mar 2011 01:45:25 +0200

> 	The "ipv4: Inline fib_semantic_match into check_leaf"
> change forgets to return the route errors. check_leaf should
> return the same results as fib_table_lookup.
> 
> Signed-off-by: Julian Anastasov <ja@ssi.bg>

Your mailer corrupted this patch, so I applied it by hand.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman March 27, 2011, 12:35 a.m. UTC | #2
On Fri, Mar 25, 2011 at 08:33:38PM -0700, David Miller wrote:
> From: Julian Anastasov <ja@ssi.bg>
> Date: Sat, 26 Mar 2011 01:45:25 +0200
> 
> > 	The "ipv4: Inline fib_semantic_match into check_leaf"
> > change forgets to return the route errors. check_leaf should
> > return the same results as fib_table_lookup.
> > 
> > Signed-off-by: Julian Anastasov <ja@ssi.bg>
> 
> Your mailer corrupted this patch, so I applied it by hand.

I have noticed that Julian's patches usually arrive
with two leading spaces where there should be one but
are otherwise intact.  And that its not a new thing,
I can remember seeing this 6 months ago, and I don't think
it was a new thing then either.

Just an observation.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Julian Anastasov March 27, 2011, 6:17 a.m. UTC | #3
Hello,

On Sun, 27 Mar 2011, Simon Horman wrote:

> > Your mailer corrupted this patch, so I applied it by hand.
> 
> I have noticed that Julian's patches usually arrive
> with two leading spaces where there should be one but
> are otherwise intact.  And that its not a new thing,
> I can remember seeing this 6 months ago, and I don't think
> it was a new thing then either.
> 
> Just an observation.

	Yes, I just yesterday discovered this format=flowed
problem myself. Then I found Documentation/email-clients.txt
explaining everything. Sorry, I hope now there should be
no problems with my emails.

Regards

--
Julian Anastasov <ja@ssi.bg>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff -urp net-2.6-fcd13f4/linux/net/ipv4/fib_trie.c linux/net/ipv4/fib_trie.c
--- net-2.6-fcd13f4/linux/net/ipv4/fib_trie.c	2011-03-25 22:33:44.000000000 +0200
+++ linux/net/ipv4/fib_trie.c	2011-03-26 01:37:15.027383449 +0200
@@ -1365,9 +1365,9 @@  static int check_leaf(struct fib_table *
 			err = fib_props[fa->fa_type].error;
 			if (err) {
 #ifdef CONFIG_IP_FIB_TRIE_STATS
-				t->stats.semantic_match_miss++;
+				t->stats.semantic_match_passed++;
 #endif
-				return 1;
+				return err;
 			}
 			if (fi->fib_flags & RTNH_F_DEAD)
 				continue;