RDMA/cxgb4: Allow loopback connections

find_route() must treat loopback as a valid egress interface.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
Steve Wise 2014-03-19 17:44:39 +05:30 committed by Roland Dreier
parent ffd435924c
commit f8e819081f
1 changed files with 2 additions and 1 deletions

View File

@ -400,7 +400,8 @@ static struct dst_entry *find_route(struct c4iw_dev *dev, __be32 local_ip,
n = dst_neigh_lookup(&rt->dst, &peer_ip);
if (!n)
return NULL;
if (!our_interface(dev, n->dev)) {
if (!our_interface(dev, n->dev) &&
!(n->dev->flags & IFF_LOOPBACK)) {
dst_release(&rt->dst);
return NULL;
}