Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/iscsid/iscsid.c
Show First 20 Lines • Show All 247 Lines • ▼ Show 20 Lines | if (conn->conn_conf.isc_iser) { | ||||
log_debugx("connecting to %s using ICL kernel proxy", to_addr); | log_debugx("connecting to %s using ICL kernel proxy", to_addr); | ||||
error = ioctl(iscsi_fd, ISCSIDCONNECT, &idc); | error = ioctl(iscsi_fd, ISCSIDCONNECT, &idc); | ||||
if (error != 0) { | if (error != 0) { | ||||
fail(conn, strerror(errno)); | fail(conn, strerror(errno)); | ||||
log_err(1, "failed to connect to %s " | log_err(1, "failed to connect to %s " | ||||
"using ICL kernel proxy: ISCSIDCONNECT", to_addr); | "using ICL kernel proxy: ISCSIDCONNECT", to_addr); | ||||
} | } | ||||
if (from_ai != NULL) | |||||
freeaddrinfo(from_ai); | |||||
freeaddrinfo(to_ai); | |||||
return (conn); | return (conn); | ||||
} | } | ||||
#endif /* ICL_KERNEL_PROXY */ | #endif /* ICL_KERNEL_PROXY */ | ||||
if (conn->conn_conf.isc_iser) { | if (conn->conn_conf.isc_iser) { | ||||
fail(conn, "iSER not supported"); | fail(conn, "iSER not supported"); | ||||
log_errx(1, "iscsid(8) compiled without ICL_KERNEL_PROXY " | log_errx(1, "iscsid(8) compiled without ICL_KERNEL_PROXY " | ||||
"does not support iSER"); | "does not support iSER"); | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | if (from_ai != NULL) { | ||||
} | } | ||||
} | } | ||||
log_debugx("connecting to %s", to_addr); | log_debugx("connecting to %s", to_addr); | ||||
error = connect(conn->conn_socket, to_ai->ai_addr, to_ai->ai_addrlen); | error = connect(conn->conn_socket, to_ai->ai_addr, to_ai->ai_addrlen); | ||||
if (error != 0) { | if (error != 0) { | ||||
fail(conn, strerror(errno)); | fail(conn, strerror(errno)); | ||||
log_err(1, "failed to connect to %s", to_addr); | log_err(1, "failed to connect to %s", to_addr); | ||||
} | } | ||||
if (from_ai != NULL) | |||||
freeaddrinfo(from_ai); | |||||
freeaddrinfo(to_ai); | |||||
return (conn); | return (conn); | ||||
} | } | ||||
static void | static void | ||||
handoff(struct connection *conn) | handoff(struct connection *conn) | ||||
{ | { | ||||
struct iscsi_daemon_handoff idh; | struct iscsi_daemon_handoff idh; | ||||
▲ Show 20 Lines • Show All 341 Lines • Show Last 20 Lines |