tinc 1.1 "Got ADD_EDGE ... which does not match existing entry"
Sven-Haegar Koch
haegar at sdinet.de
Sun May 17 05:41:30 CEST 2015
On Sat, 16 May 2015, Sven-Haegar Koch wrote:
> On Sat, 16 May 2015, Guus Sliepen wrote:
>
> > On Sat, May 16, 2015 at 12:09:52AM +0200, Sven-Haegar Koch wrote:
> >
> > > This change is not so good:
> > >
> > > Connection with aaa_vpnhub1 (1.2.3.4 port 443) activated
> > > Error while translating addresses: ai_family not supported
> > >
> > > (And then the tinc process exists)
> >
> > Hm, I couldn't reproduce it, but I committed a fix anyway that makes
> > sockaddr2str() handle AF_UNSPEC addresses. It might just have moved the
> > problem though.
>
> Thanks Guus.
> At least it does not explode anymore ;)
>
> "tinc dump edges" contains a wild mix of "local unspec port unspec",
> "local unknown port unknown" and some adresses, but I assume that is
> expected and ok.
Executing "tinc dump edges" seems to work, but creates a lot of log
entries "Error while looking up hostname: ai_family not supported" - the
following patch to sockaddr2hostname() structured after your change to
sockaddr2str() fixes that.
c'ya
sven-haegar
commit d8f02eebbf37a54a11314d4571f728d18d758864
Author: Sven-Haegar Koch <haegar at sdinet.de>
Date: Sun May 17 05:29:21 2015 +0200
Let sockaddr2hostname() handle AF_UNSPEC addresses.
diff --git a/src/netutl.c b/src/netutl.c
index 701a430..2eebb64 100644
--- a/src/netutl.c
+++ b/src/netutl.c
@@ -121,7 +121,10 @@ char *sockaddr2hostname(const sockaddr_t *sa) {
char port[NI_MAXSERV] = "unknown";
int err;
- if(sa->sa.sa_family == AF_UNKNOWN) {
+ if(sa->sa.sa_family == AF_UNSPEC) {
+ xasprintf(&str, "unspec port unspec");
+ return str;
+ } else if(sa->sa.sa_family == AF_UNKNOWN) {
xasprintf(&str, "%s port %s", sa->unknown.address, sa->unknown.port);
return str;
}
--
Three may keep a secret, if two of them are dead.
- Ben F.
More information about the tinc-devel
mailing list