aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-23 16:57:45 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-23 19:36:27 -0400
commit13378cad02afc2adc6c0e07fca03903c7ada0b37 (patch)
treee12625227f409a7b658c4f39a2dc926cf60bb27e /include/net/route.h
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/route.h')
-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 60d611dc5cee..c29ef2733f2d 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
277 277
278static inline int inet_iif(const struct sk_buff *skb) 278static inline int inet_iif(const struct sk_buff *skb)
279{ 279{
280 return skb_rtable(skb)->rt_iif; 280 int iif = skb_rtable(skb)->rt_iif;
281
282 if (iif)
283 return iif;
284 return skb->skb_iif;
281} 285}
282 286
283extern int sysctl_ip_default_ttl; 287extern int sysctl_ip_default_ttl;