ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/connection.C
(Generate patch)

Comparing gvpe/src/connection.C (file contents):
Revision 1.38 by pcg, Sun Jul 25 18:11:40 2004 UTC vs.
Revision 1.39 by pcg, Tue Oct 12 12:06:06 2004 UTC

1098 break; 1098 break;
1099 1099
1100 case vpn_packet::PT_CONNECT_INFO: 1100 case vpn_packet::PT_CONNECT_INFO:
1101 if (ictx && octx && rsi == si && pkt->hmac_chk (ictx)) 1101 if (ictx && octx && rsi == si && pkt->hmac_chk (ictx))
1102 { 1102 {
1103 connect_info_packet *p = (connect_info_packet *) pkt; 1103 connect_info_packet *p = (connect_info_packet *)pkt;
1104 1104
1105 assert (p->id > 0 && p->id <= vpn->conns.size ()); // hmac-auth does not mean we accept anything 1105 if (p->id > 0 && p->id <= vpn->conns.size ()) // hmac-auth does not mean we accept anything
1106 1106 {
1107 connection *c = vpn->conns[p->id - 1]; 1107 connection *c = vpn->conns[p->id - 1];
1108 1108
1109 c->conf->protocols = p->protocols; 1109 c->conf->protocols = p->protocols;
1110 protocol = best_protocol (c->conf->protocols & THISNODE->protocols & p->si.supported_protocols (c->conf)); 1110 protocol = best_protocol (c->conf->protocols & THISNODE->protocols & p->si.supported_protocols (c->conf));
1111 p->si.upgrade_protocol (protocol, c->conf); 1111 p->si.upgrade_protocol (protocol, c->conf);
1112 1112
1113 slog (L_TRACE, "<<%d PT_CONNECT_INFO(%d,%s) (%d)", 1113 slog (L_TRACE, "<<%d PT_CONNECT_INFO(%d,%s) (%d)",
1114 conf->id, p->id, (const char *)p->si, !c->ictx && !c->octx); 1114 conf->id, p->id, (const char *)p->si, !c->ictx && !c->octx);
1115 1115
1116 const sockinfo &dsi = forward_si (p->si); 1116 const sockinfo &dsi = forward_si (p->si);
1117 1117
1118 if (dsi.valid ()) 1118 if (dsi.valid ())
1119 c->send_auth_request (dsi, true); 1119 c->send_auth_request (dsi, true);
1120 }
1120 } 1121 }
1121 1122
1122 break; 1123 break;
1123 1124
1124 default: 1125 default:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines