PeerGroup config: Ignore local address quietly to allow symmetric configs
This commit is contained in:
parent
f62eedd847
commit
0312148286
12
src/config.c
12
src/config.c
|
|
@ -583,13 +583,17 @@ int do_peergroup(struct peerip_config_t **lq, int argc, char **argv)
|
|||
goto err;
|
||||
}
|
||||
|
||||
/* check that the address is not mine (loop!), and that we don't have
|
||||
* it configured already (dupes!)
|
||||
/* Check that the address is not mine (loop!), and that we don't have
|
||||
* it configured already (dupes!). My address is ignored quietly, allowing symmetric
|
||||
* peer configs on all nodes.
|
||||
*/
|
||||
|
||||
if (ai_comp(ai, my_ai)) {
|
||||
hlog(LOG_ERR, "PeerGroup: remote address %s is the same as my local address, would cause a loop!", fullhost);
|
||||
goto err;
|
||||
//hlog(LOG_DEBUG, "PeerGroup: Ignoring %s - it's me, my local address", fullhost);
|
||||
hfree(fullhost);
|
||||
hfree(peerid);
|
||||
freeaddrinfo(ai);
|
||||
continue;
|
||||
}
|
||||
|
||||
for (pe = *lq; (pe); pe = pe->next) {
|
||||
|
|
|
|||
|
|
@ -53,9 +53,11 @@ Uplink full1 full tcp 127.0.0.1 10153
|
|||
|
||||
# UDP peering, first address is my local address, the rest are remote.
|
||||
PeerGroup TEST udp 127.0.0.1:16404 \
|
||||
SELF 127.0.0.1:16404 \
|
||||
PEER1 127.0.0.1:16405 \
|
||||
PEER2 127.0.0.1:16406
|
||||
PeerGroup TEST6 udp [::1]:16504 \
|
||||
SELF6 [::1]:16504 \
|
||||
PEER61 [::1]:16505 \
|
||||
PEER62 [::1]:16506
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue