X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=include%2Fnet%2Froute.h;h=ad777d79af945877a9a8214748f5cd6b28824028;hb=be1332c0994fbf016fa4ef0f0c4acda566fe6cb3;hp=6de665bf175041d0b11e5841fe8012196e9b9c98;hpb=91e8d0cbc94f81f110e508c3105dd93fb146d6b5;p=cascardo%2Flinux.git diff --git a/include/net/route.h b/include/net/route.h index 6de665bf1750..ad777d79af94 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -325,10 +325,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; }