All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] ipv4: return valid RTA_IIF on ip route get
@ 2014-04-13 15:08 Julian Anastasov
  2014-04-14  3:24 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Julian Anastasov @ 2014-04-13 15:08 UTC (permalink / raw
  To: David Miller; +Cc: netdev

Extend commit 13378cad02afc2adc6c0e07fca03903c7ada0b37
("ipv4: Change rt->rt_iif encoding.") from 3.6 to return valid
RTA_IIF on 'ip route get ... iif DEVICE' instead of rt_iif 0
which is displayed as 'iif *'.

inet_iif is not appropriate to use because skb_iif is not set.
Use the skb->dev->ifindex instead.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
---
 net/ipv4/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 34d094c..20a59c3 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2357,7 +2357,7 @@ static int rt_fill_info(struct net *net,  __be32 dst, __be32 src,
 			}
 		} else
 #endif
-			if (nla_put_u32(skb, RTA_IIF, rt->rt_iif))
+			if (nla_put_u32(skb, RTA_IIF, skb->dev->ifindex))
 				goto nla_put_failure;
 	}
 
-- 
1.8.5.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] ipv4: return valid RTA_IIF on ip route get
  2014-04-13 15:08 [PATCH net] ipv4: return valid RTA_IIF on ip route get Julian Anastasov
@ 2014-04-14  3:24 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-04-14  3:24 UTC (permalink / raw
  To: ja; +Cc: netdev

From: Julian Anastasov <ja@ssi.bg>
Date: Sun, 13 Apr 2014 18:08:02 +0300

> Extend commit 13378cad02afc2adc6c0e07fca03903c7ada0b37
> ("ipv4: Change rt->rt_iif encoding.") from 3.6 to return valid
> RTA_IIF on 'ip route get ... iif DEVICE' instead of rt_iif 0
> which is displayed as 'iif *'.
> 
> inet_iif is not appropriate to use because skb_iif is not set.
> Use the skb->dev->ifindex instead.
> 
> Signed-off-by: Julian Anastasov <ja@ssi.bg>

Applied and queued up for -stable, thanks Julian.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-14  3:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-13 15:08 [PATCH net] ipv4: return valid RTA_IIF on ip route get Julian Anastasov
2014-04-14  3:24 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.