diff --git a/src/config.c b/src/config.c index 3323c05..d16f725 100644 --- a/src/config.c +++ b/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) { diff --git a/tests/cfg-aprsc/basic b/tests/cfg-aprsc/basic index 7d1f9b4..e75e79d 100644 --- a/tests/cfg-aprsc/basic +++ b/tests/cfg-aprsc/basic @@ -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