address may suddenly change couldn't communicate reliably because
their contact addresses might both change at once. [false]
mobile-peers-max (integer): Maximum number of peer port/addr pairs we
- remember and send to. Must be at least 1 and no more than 5. [3]
+ remember and send to. Must be at least 1 and no more than 5.
+ [4 if an address is configured, otherwise 3]
static-peers-max (integer): Maximum number of peer port/addr pairs
we can try for a static site. Must be at least 1 and no more
- than 5. [3]
+ than 5. [4 or 3, as above]
mobile-peer-expiry (integer): For "mobile" peers only, the length
of time (in seconds) for which we will keep sending to multiple
address/ports from which we have not seen incoming traffic. [120]
#define DEFAULT_MOBILE_WAIT_TIME (10*1000) /* [ms] */
#define DEFAULT_MOBILE_PEER_EXPIRY (2*60) /* [s] */
-#define DEFAULT_PEERS_MAX 3 /* send at most this many copies (default) */
/* Each site can be in one of several possible states. */
const char *peerskey= st->peer_mobile
? "mobile-peers-max" : "static-peers-max";
st->transport_peers_max= dict_read_number(
- dict,peerskey,False,"site",loc,DEFAULT_PEERS_MAX);
+ dict,peerskey,False,"site",loc, st->address ? 4 : 3);
if (st->transport_peers_max<1 ||
st->transport_peers_max>MAX_PEER_ADDRS) {
cfgfatal(loc,"site", "%s must be in range 1.."