diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-24 00:57:45 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-24 03:36:27 +0400 |
commit | 13378cad02afc2adc6c0e07fca03903c7ada0b37 (patch) | |
tree | e12625227f409a7b658c4f39a2dc926cf60bb27e /include/net | |
parent | b68581778cd0051a3fb9a2b614dee7eccb5127ff (diff) | |
download | linux-13378cad02afc2adc6c0e07fca03903c7ada0b37.tar.xz |
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.h | 6 |
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 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; |