summaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/route.h')
-rw-r--r--include/net/route.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/net/route.h b/include/net/route.h
index 9b0a523bb428..f4b11eee1754 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -322,10 +322,11 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable
322 322
323static inline int inet_iif(const struct sk_buff *skb) 323static inline int inet_iif(const struct sk_buff *skb)
324{ 324{
325 int iif = skb_rtable(skb)->rt_iif; 325 struct rtable *rt = skb_rtable(skb);
326
327 if (rt && rt->rt_iif)
328 return rt->rt_iif;
326 329
327 if (iif)
328 return iif;
329 return skb->skb_iif; 330 return skb->skb_iif;
330} 331}
331 332