+ if( (interface = getenv( ENV_BIND_IF )) == NULL ) { // if specific interface not defined, listen on all (IPv4, IPv6, or interface name)
+ /*
+ compares the first ip sussed out by mk_ip_list (returned by get_default_ip)
+ NOTE: this might be not work very predictable in dual-stack where an interface can have IPv4 and IPv6 addresses assigned,
+ meaning that it can select either IPv4 or IPv6 on applications restarts (depends on the order of IP addresses assigned on the interface)
+ */
+ if( my_ip[0] == '[' ) { // IPv6
+ interface = "[::]";
+ } else { // IPv4
+ interface = "0.0.0.0";
+ if( flags & RMRFL_NAME_ONLY ) { // if hostname is given instead of IP in RMR source address
+ rmr_vlog( RMR_VL_WARN, "rmr_init: hostname:ip is provided as source information for rts() calls, falling back to any IPv4\n" );
+ }
+ }
+ }