"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "esp.c" between
openconnect-8.04.tar.gz and openconnect-8.05.tar.gz

About: OpenConnect is a client for Cisco\PKG_DESCR_TTrsquo;s AnyConnect SSL VPN, which is supported by many Cisco Routers.

esp.c  (openconnect-8.04):esp.c  (openconnect-8.05)
skipping to change at line 305 skipping to change at line 305
case KA_NONE: case KA_NONE:
break; break;
} }
while (1) { while (1) {
int len; int len;
if (vpninfo->deflate_pkt) { if (vpninfo->deflate_pkt) {
this = vpninfo->deflate_pkt; this = vpninfo->deflate_pkt;
len = this->len; len = this->len;
} else { } else {
uint8_t dontsend;
this = dequeue_packet(&vpninfo->outgoing_queue); this = dequeue_packet(&vpninfo->outgoing_queue);
if (!this) if (!this)
break; break;
/* Pulse can only accept ESP of the same protocol as the if (vpninfo->proto->udp_send_probes == oncp_esp_send_prob
one you es) {
* connected to it with. The other has to go over IF-T/TL uint8_t dontsend;
S. */
if (vpninfo->dtls_addr->sa_family == AF_INET6) /* Pulse/NC can only accept ESP of the same proto
dontsend = 0x40; col as the one
else * you connected to it with. The other has to go
dontsend = 0x60; over IF-T/TLS. */
if (vpninfo->dtls_addr->sa_family == AF_INET6)
if ( (this->data[0] & 0xf0) == dontsend) { dontsend = 0x40;
store_be32(&this->pulse.vendor, 0xa4c); else
store_be32(&this->pulse.type, 4); dontsend = 0x60;
store_be32(&this->pulse.len, this->len + 16);
queue_packet(&vpninfo->oncp_control_queue, this); if ( (this->data[0] & 0xf0) == dontsend) {
work_done = 1; store_be32(&this->pulse.vendor, 0xa4c);
continue; store_be32(&this->pulse.type, 4);
store_be32(&this->pulse.len, this->len +
16);
queue_packet(&vpninfo->oncp_control_queue
, this);
work_done = 1;
continue;
}
} }
len = construct_esp_packet(vpninfo, this, 0); len = construct_esp_packet(vpninfo, this, 0);
if (len < 0) { if (len < 0) {
/* Should we disable ESP? */ /* Should we disable ESP? */
free(this); free(this);
work_done = 1; work_done = 1;
continue; continue;
} }
} }
ret = send(vpninfo->dtls_fd, (void *)&this->esp, len, 0); ret = send(vpninfo->dtls_fd, (void *)&this->esp, len, 0);
 End of changes. 3 change blocks. 
18 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)