… | |
… | |
717 | } |
717 | } |
718 | |
718 | |
719 | void |
719 | void |
720 | connection::send_connect_info (int rid, const sockinfo &rsi, u8 rprotocols) |
720 | connection::send_connect_info (int rid, const sockinfo &rsi, u8 rprotocols) |
721 | { |
721 | { |
722 | slog (L_TRACE, ">>%d PT_CONNECT_INFO(%d,%s)\n", |
722 | slog (L_TRACE, ">>%d PT_CONNECT_INFO(%d,%s)", |
723 | conf->id, rid, (const char *)rsi); |
723 | conf->id, rid, (const char *)rsi); |
724 | |
724 | |
725 | connect_info_packet *r = new connect_info_packet (conf->id, rid, rsi, rprotocols); |
725 | connect_info_packet *r = new connect_info_packet (conf->id, rid, rsi, rprotocols); |
726 | |
726 | |
727 | r->hmac_set (octx); |
727 | r->hmac_set (octx); |
… | |
… | |
1087 | if (p->id > 0 && p->id <= vpn->conns.size ()) |
1087 | if (p->id > 0 && p->id <= vpn->conns.size ()) |
1088 | { |
1088 | { |
1089 | connection *c = vpn->conns[p->id - 1]; |
1089 | connection *c = vpn->conns[p->id - 1]; |
1090 | conf->protocols = p->protocols; |
1090 | conf->protocols = p->protocols; |
1091 | |
1091 | |
1092 | slog (L_TRACE, "<<%d PT_CONNECT_REQ(%d) [%d]\n", |
1092 | slog (L_TRACE, "<<%d PT_CONNECT_REQ(%d) [%d]", |
1093 | conf->id, p->id, c->ictx && c->octx); |
1093 | conf->id, p->id, c->ictx && c->octx); |
1094 | |
1094 | |
1095 | if (c->ictx && c->octx) |
1095 | if (c->ictx && c->octx) |
1096 | { |
1096 | { |
1097 | // send connect_info packets to both sides, in case one is |
1097 | // send connect_info packets to both sides, in case one is |