Skip to content

Commit 83886b6

Browse files
swhitehoDavid S. Miller
authored and
David S. Miller
committed
[NET]: Change "not found" return value for rule lookup
This changes the "not found" error return for the lookup function to -ESRCH so that it can be distinguished from the case where a rule or route resulting in -ENETUNREACH has been found during the search. It fixes a bug where if DECnet was compiled with routing support, but no routes were added to the routing table, it was failing to fall back to endnode routing. Signed-off-by: Steven Whitehouse <[email protected]> Signed-off-by: Patrick Caulfield <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9a5ee4c commit 83886b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/fib_rules.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl,
143143
}
144144
}
145145

146-
err = -ENETUNREACH;
146+
err = -ESRCH;
147147
out:
148148
rcu_read_unlock();
149149

0 commit comments

Comments
 (0)