summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-23 13:57:45 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-23 16:36:27 -0700
commit13378cad02afc2adc6c0e07fca03903c7ada0b37 (patch)
treee12625227f409a7b658c4f39a2dc926cf60bb27e /include/net
parentb68581778cd0051a3fb9a2b614dee7eccb5127ff (diff)
ipv4: Change rt->rt_iif encoding.
On input packet processing, rt->rt_iif will be zero if we should use skb->dev->ifindex. Since we access rt->rt_iif consistently via inet_iif(), that is the only spot whose interpretation have to adjust. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/route.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/route.h b/include/net/route.h
index 60d611dc5ce..c29ef2733f2 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -277,7 +277,11 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable
static inline int inet_iif(const struct sk_buff *skb)
{
- return skb_rtable(skb)->rt_iif;
+ int iif = skb_rtable(skb)->rt_iif;
+
+ if (iif)
+ return iif;
+ return skb->skb_iif;
}
extern int sysctl_ip_default_ttl;