diff options
author | trasz <trasz@FreeBSD.org> | 2014-05-07 07:37:55 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-05-07 07:37:55 +0000 |
commit | 21ec0cf2d04e4aa633946733cbc2771bb4ceb398 (patch) | |
tree | 58555ca5911d866052e6587412bcb42076b5e484 /sys/dev | |
parent | a59839947cb5d7096df809172f3a5d5085bf9b8a (diff) | |
download | FreeBSD-src-21ec0cf2d04e4aa633946733cbc2771bb4ceb398.zip FreeBSD-src-21ec0cf2d04e4aa633946733cbc2771bb4ceb398.tar.gz |
MFC r264530:
Properly pass the initiator address when running in proxy mode.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/iscsi/icl.h | 6 | ||||
-rw-r--r-- | sys/dev/iscsi/icl_proxy.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/iscsi/icl.h b/sys/dev/iscsi/icl.h index e30c3d1..5f03434 100644 --- a/sys/dev/iscsi/icl.h +++ b/sys/dev/iscsi/icl.h @@ -128,7 +128,8 @@ struct icl_listen_sock { struct icl_listen { TAILQ_HEAD(, icl_listen_sock) il_sockets; struct sx il_lock; - void (*il_accept)(struct socket *, int); + void (*il_accept)(struct socket *, + struct sockaddr *, int); }; /* @@ -140,7 +141,8 @@ int icl_conn_connect(struct icl_conn *ic, bool rdma, /* * Target part. */ -struct icl_listen *icl_listen_new(void (*accept_cb)(struct socket *, int)); +struct icl_listen *icl_listen_new(void (*accept_cb)(struct socket *, + struct sockaddr *, int)); void icl_listen_free(struct icl_listen *il); int icl_listen_add(struct icl_listen *il, bool rdma, int domain, int socktype, int protocol, diff --git a/sys/dev/iscsi/icl_proxy.c b/sys/dev/iscsi/icl_proxy.c index 18c9d20..4411730 100644 --- a/sys/dev/iscsi/icl_proxy.c +++ b/sys/dev/iscsi/icl_proxy.c @@ -182,7 +182,7 @@ icl_conn_connect(struct icl_conn *ic, bool rdma, int domain, int socktype, } struct icl_listen * -icl_listen_new(void (*accept_cb)(struct socket *, int)) +icl_listen_new(void (*accept_cb)(struct socket *, struct sockaddr *, int)) { struct icl_listen *il; @@ -296,9 +296,10 @@ icl_accept_thread(void *arg) if (sa != NULL) free(sa, M_SONAME); soclose(so); + continue; } - (ils->ils_listen->il_accept)(so, ils->ils_id); + (ils->ils_listen->il_accept)(so, sa, ils->ils_id); } } |