net: Checks skb_dst to be NULL in inet_iif
[deliverable/linux.git] / include / net / route.h
index 9b0a523bb4280023e4429fcc5379cb5d2d2d419a..f4b11eee1754a78c76f15b76537b295f37ae6ac3 100644 (file)
@@ -322,10 +322,11 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable
 
 static inline int inet_iif(const struct sk_buff *skb)
 {
-       int iif = skb_rtable(skb)->rt_iif;
+       struct rtable *rt = skb_rtable(skb);
+
+       if (rt && rt->rt_iif)
+               return rt->rt_iif;
 
-       if (iif)
-               return iif;
        return skb->skb_iif;
 }
 
This page took 0.024351 seconds and 5 git commands to generate.