From 86e3b85a500e676b233795dec2eaac41da3e88a5 Mon Sep 17 00:00:00 2001
From: Lorenzo Colitti <lorenzo@google.com>
Date: Mon, 2 Mar 2015 12:06:45 +0900
Subject: [PATCH] Set the iif for IPv6 packets as well.

This was fixed upstream in a more comprehensive way by 1fb9489bf,
but this one-line fix is consistent with the rest of the 3.4
networking code.

Change-Id: I342ca90c6d0213a7aeac9a2b18283530998f81d7
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
---
 net/ipv6/route.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 3e6b53b981a0..ab71b41e1394 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -928,6 +928,8 @@ struct dst_entry * ip6_route_output(struct net *net, const struct sock *sk,
 {
 	int flags = 0;
 
+	fl6->flowi6_iif = net->loopback_dev->ifindex;
+
 	if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl6->daddr))
 		flags |= RT6_LOOKUP_F_IFACE;
 
-- 
GitLab