Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314970
b: refs/heads/master
c: 0b399d4
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 5, 2012
1 parent 01eb27c commit 695bf4b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24db1ba866eebf5b516df80ea2212d2479bfb502
refs/heads/master: 0b399d46b317a6d0a73ad523e014ecfa4d449769
12 changes: 8 additions & 4 deletions trunk/drivers/scsi/cxgbi/libcxgbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ static struct cxgbi_sock *cxgbi_check_route(struct sockaddr *dst_addr)
goto err_out;
}
dst = &rt->dst;
n = dst_get_neighbour_noref(dst);
n = dst_neigh_lookup(dst, &daddr->sin_addr.s_addr);
if (!n) {
err = -ENODEV;
goto rel_rt;
Expand All @@ -506,7 +506,7 @@ static struct cxgbi_sock *cxgbi_check_route(struct sockaddr *dst_addr)
&daddr->sin_addr.s_addr, ntohs(daddr->sin_port),
ndev->name);
err = -ENETUNREACH;
goto rel_rt;
goto rel_neigh;
}

if (ndev->flags & IFF_LOOPBACK) {
Expand All @@ -521,7 +521,7 @@ static struct cxgbi_sock *cxgbi_check_route(struct sockaddr *dst_addr)
pr_info("dst %pI4, %s, NOT cxgbi device.\n",
&daddr->sin_addr.s_addr, ndev->name);
err = -ENETUNREACH;
goto rel_rt;
goto rel_neigh;
}
log_debug(1 << CXGBI_DBG_SOCK,
"route to %pI4 :%u, ndev p#%d,%s, cdev 0x%p.\n",
Expand All @@ -531,7 +531,7 @@ static struct cxgbi_sock *cxgbi_check_route(struct sockaddr *dst_addr)
csk = cxgbi_sock_create(cdev);
if (!csk) {
err = -ENOMEM;
goto rel_rt;
goto rel_neigh;
}
csk->cdev = cdev;
csk->port_id = port;
Expand All @@ -541,9 +541,13 @@ static struct cxgbi_sock *cxgbi_check_route(struct sockaddr *dst_addr)
csk->daddr.sin_port = daddr->sin_port;
csk->daddr.sin_family = daddr->sin_family;
csk->saddr.sin_addr.s_addr = fl4.saddr;
neigh_release(n);

return csk;

rel_neigh:
neigh_release(n);

rel_rt:
ip_rt_put(rt);
if (csk)
Expand Down

0 comments on commit 695bf4b

Please sign in to comment.