uint32_t in_max_output,
DATA_BLOB *out_output)
{
+ struct samba_sockaddr xconn_srv_addr = { .sa_socklen = 0, };
struct fsctl_net_iface_info *array = NULL;
struct fsctl_net_iface_info *first = NULL;
struct fsctl_net_iface_info *last = NULL;
size_t num_ifaces;
enum ndr_err_code ndr_err;
struct cluster_movable_ips *cluster_movable_ips = NULL;
+ ssize_t sret;
int ret;
if (in_input->length != 0) {
}
}
+ sret = tsocket_address_bsd_sockaddr(xconn->local_address,
+ &xconn_srv_addr.u.sa,
+ sizeof(xconn_srv_addr.u.ss));
+ if (sret < 0) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+ xconn_srv_addr.sa_socklen = sret;
+
for (i=0; i < num_ifaces; i++) {
struct fsctl_net_iface_info *cur = &array[i];
const struct interface *iface = get_interface(i);
return NT_STATUS_NO_MEMORY;
}
- if (cluster_movable_ips != NULL) {
+ if (sockaddr_equal(ifsa, &xconn_srv_addr.u.sa)) {
+ /*
+ * We can announce the ip of the current connection even
+ * if it is a moveable cluster address... as the client
+ * is already connected to it.
+ *
+ * It means in a typical ctdb cluster, where we
+ * only have public addresses, the client can at least
+ * have more than one multichannel'ed connection to the
+ * public ip.
+ */
+ } else if (cluster_movable_ips != NULL) {
bool is_movable_ip = find_in_cluster_movable_ips(
cluster_movable_ips,
ifss);