summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2017-10-10 19:25:30 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2017-10-11 14:24:58 -0400
commit4c2a02157fdd5dc71de7cf42eff07576746eb450 (patch)
treed334237d1f5e3f0f3eaeb6062871ccfb59468e13 /drivers/scsi/cxgbi
parent607162140d8ab62c8fabb0992bd798edf9f97466 (diff)
downloadlinux-4c2a02157fdd5dc71de7cf42eff07576746eb450.tar.bz2
scsi: libcxgbi: in case of vlan pass 0 as ifindex to find route
In case of vlan pass 0 as ifindex to find route instead of passing real_dev ifindex, if we pass real_dev ifindex then ip_route_output_ports() and ip6_route_output() will check for route through real_dev not through vlan interface. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index da36c2de069e..f39d4d107114 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2554,7 +2554,10 @@ struct iscsi_endpoint *cxgbi_ep_connect(struct Scsi_Host *shost,
goto err_out;
}
- ifindex = hba->ndev->ifindex;
+ rtnl_lock();
+ if (!vlan_uses_dev(hba->ndev))
+ ifindex = hba->ndev->ifindex;
+ rtnl_unlock();
}
if (dst_addr->sa_family == AF_INET) {