Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359429
b: refs/heads/master
c: 3dd4849
h: refs/heads/master
i:
  359427: ff8c84a
v: v3
  • Loading branch information
Manish Rangankar authored and James Bottomley committed Jan 29, 2013
1 parent cbfb08a commit 2f78371
Show file tree
Hide file tree
Showing 2 changed files with 8 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: ad5da8c404858bf573c394d66b73b43a8e0fe5fc
refs/heads/master: 3dd4849c257af317cd33bcecf7d17b75dabf7540
11 changes: 7 additions & 4 deletions trunk/drivers/scsi/qla4xxx/ql4_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -4685,7 +4685,8 @@ static struct iscsi_endpoint *qla4xxx_get_ep_fwdb(struct scsi_qla_host *ha,
struct iscsi_endpoint *ep;
struct sockaddr_in *addr;
struct sockaddr_in6 *addr6;
struct sockaddr *dst_addr;
struct sockaddr *t_addr;
struct sockaddr_storage *dst_addr;
char *ip;

/* TODO: need to destroy on unload iscsi_endpoint*/
Expand All @@ -4694,21 +4695,23 @@ static struct iscsi_endpoint *qla4xxx_get_ep_fwdb(struct scsi_qla_host *ha,
return NULL;

if (fw_ddb_entry->options & DDB_OPT_IPV6_DEVICE) {
dst_addr->sa_family = AF_INET6;
t_addr = (struct sockaddr *)dst_addr;
t_addr->sa_family = AF_INET6;
addr6 = (struct sockaddr_in6 *)dst_addr;
ip = (char *)&addr6->sin6_addr;
memcpy(ip, fw_ddb_entry->ip_addr, IPv6_ADDR_LEN);
addr6->sin6_port = htons(le16_to_cpu(fw_ddb_entry->port));

} else {
dst_addr->sa_family = AF_INET;
t_addr = (struct sockaddr *)dst_addr;
t_addr->sa_family = AF_INET;
addr = (struct sockaddr_in *)dst_addr;
ip = (char *)&addr->sin_addr;
memcpy(ip, fw_ddb_entry->ip_addr, IP_ADDR_LEN);
addr->sin_port = htons(le16_to_cpu(fw_ddb_entry->port));
}

ep = qla4xxx_ep_connect(ha->host, dst_addr, 0);
ep = qla4xxx_ep_connect(ha->host, (struct sockaddr *)dst_addr, 0);
vfree(dst_addr);
return ep;
}
Expand Down

0 comments on commit 2f78371

Please sign in to comment.