Thread (3 messages) 3 messages, 3 authors, 2015-09-03

Re: [PATCH v3] net: Fix behaviour of unreachable, blackhole and prohibit routes

flat view

From: David Miller <davem@davemloft.net>
Date: 2015-09-03 17:31:10

From: Nikola Forró <redacted>
Date: Thu, 03 Sep 2015 12:05:22 +0200
quoted hunk ↗ jump to hunk
@@ -233,8 +233,11 @@ static inline int fib_lookup(struct net *net, const struct flowi4 *flp,
 	rcu_read_lock();
 
 	tb = fib_get_table(net, RT_TABLE_MAIN);
-	if (tb && !fib_table_lookup(tb, flp, res, flags | FIB_LOOKUP_NOREF))
-		err = 0;
+	if (tb) {
+		err = fib_table_lookup(tb, flp, res, flags | FIB_LOOKUP_NOREF);
+		if (err == -EAGAIN)
+			err = -ENETUNREACH;
+	}
 
You resubmitted this so quickly, there is no way you did any testing
of this code path even after fixing up the curly brace issue.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help