… | |
… | |
1310 | |
1310 | |
1311 | c->conf->protocols = p->protocols; |
1311 | c->conf->protocols = p->protocols; |
1312 | protocol = best_protocol (c->conf->protocols & THISNODE->protocols & p->si.supported_protocols (c->conf)); |
1312 | protocol = best_protocol (c->conf->protocols & THISNODE->protocols & p->si.supported_protocols (c->conf)); |
1313 | p->si.upgrade_protocol (protocol, c->conf); |
1313 | p->si.upgrade_protocol (protocol, c->conf); |
1314 | |
1314 | |
1315 | slog (L_TRACE, "%s >> PT_CONNECT_INFO(%s,%s,p%02x) [%d]", |
1315 | slog (L_TRACE, "%s >> PT_CONNECT_INFO(%s,%s,protocols=%02x,protocol=%02x,upgradable=%02x) [%d]", |
1316 | conf->nodename, |
1316 | conf->nodename, |
1317 | vpn->conns[p->id - 1]->conf->nodename, |
1317 | vpn->conns[p->id - 1]->conf->nodename, |
1318 | (const char *)p->si, |
1318 | (const char *)p->si, |
1319 | p->protocols, |
1319 | p->protocols, |
|
|
1320 | protocol, |
|
|
1321 | p->si.supported_protocols (c->conf), |
1320 | !c->ictx && !c->octx); |
1322 | !c->ictx && !c->octx); |
1321 | |
1323 | |
1322 | const sockinfo &dsi = forward_si (p->si); |
1324 | const sockinfo &dsi = forward_si (p->si); |
1323 | |
1325 | |
1324 | if (dsi.valid ()) |
1326 | if (dsi.valid ()) |
1325 | c->send_auth_request (dsi, true); |
1327 | c->send_auth_request (dsi, true); |
|
|
1328 | else |
|
|
1329 | slog (L_INFO, "connect info for %s received (%s), but still unable to contact.", |
|
|
1330 | vpn->conns[p->id - 1]->conf->nodename, |
|
|
1331 | (const char *)p->si); |
1326 | } |
1332 | } |
1327 | else |
1333 | else |
1328 | slog (L_WARN, |
1334 | slog (L_WARN, |
1329 | _("received authenticated connection request from unknown node #%d, config file mismatch?"), |
1335 | _("received authenticated connection request from unknown node #%d, config file mismatch?"), |
1330 | p->id); |
1336 | p->id); |