aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index f7afcba8b1a1..6bab84503cd9 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2036,6 +2036,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
2036 struct fib_result res; 2036 struct fib_result res;
2037 struct rtable *rth; 2037 struct rtable *rth;
2038 int orig_oif; 2038 int orig_oif;
2039 int err = -ENETUNREACH;
2039 2040
2040 res.tclassid = 0; 2041 res.tclassid = 0;
2041 res.fi = NULL; 2042 res.fi = NULL;
@@ -2144,7 +2145,8 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
2144 goto make_route; 2145 goto make_route;
2145 } 2146 }
2146 2147
2147 if (fib_lookup(net, fl4, &res, 0)) { 2148 err = fib_lookup(net, fl4, &res, 0);
2149 if (err) {
2148 res.fi = NULL; 2150 res.fi = NULL;
2149 res.table = NULL; 2151 res.table = NULL;
2150 if (fl4->flowi4_oif) { 2152 if (fl4->flowi4_oif) {
@@ -2172,7 +2174,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
2172 res.type = RTN_UNICAST; 2174 res.type = RTN_UNICAST;
2173 goto make_route; 2175 goto make_route;
2174 } 2176 }
2175 rth = ERR_PTR(-ENETUNREACH); 2177 rth = ERR_PTR(err);
2176 goto out; 2178 goto out;
2177 } 2179 }
2178 2180