"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "rpcapd/daemon.c" between
libpcap-1.10.0.tar.gz and libpcap-1.10.1.tar.gz

About: libpcap is a packet filter library used by tools like tcpdump.

daemon.c  (libpcap-1.10.0):daemon.c  (libpcap-1.10.1)
skipping to change at line 378 skipping to change at line 378
{ {
// Network error. // Network error.
rpcapd_log(LOGPRIO_ERROR, "Read from client faile d: %s", errbuf); rpcapd_log(LOGPRIO_ERROR, "Read from client faile d: %s", errbuf);
goto end; goto end;
} }
if (nrecv == 0) if (nrecv == 0)
{ {
// Immediate EOF // Immediate EOF
goto end; goto end;
} }
plen = (tls_header.length_hi << 8) | tls_header.length_lo ; plen = (tls_header.length_hi << 8U) | tls_header.length_l o;
// Discard the rest of the message. // Discard the rest of the message.
if (rpcapd_discard(sockctrl, NULL, plen) == -1) if (rpcapd_discard(sockctrl, NULL, plen) == -1)
{ {
// Network error. // Network error.
goto end; goto end;
} }
// //
// Send a TLS handshake failure alert. // Send a TLS handshake failure alert.
skipping to change at line 2424 skipping to change at line 2424
// Check if all the data has been read; if not, discard the data in exces s // Check if all the data has been read; if not, discard the data in exces s
if (rpcapd_discard(pars->sockctrl, pars->ssl, plen) == -1) if (rpcapd_discard(pars->sockctrl, pars->ssl, plen) == -1)
{ {
// Network error. // Network error.
return -1; return -1;
} }
// A response is needed, otherwise the other host does not know that ever ything went well // A response is needed, otherwise the other host does not know that ever ything went well
rpcap_createhdr(&header, ver, RPCAP_MSG_UPDATEFILTER_REPLY, 0, 0); rpcap_createhdr(&header, ver, RPCAP_MSG_UPDATEFILTER_REPLY, 0, 0);
if (sock_send(pars->sockctrl, pars->ssl, (char *) &header, sizeof (struct rpcap_header), pcap_geterr(session->fp), PCAP_ERRBUF_SIZE)) if (sock_send(pars->sockctrl, pars->ssl, (char *) &header, sizeof (struct rpcap_header), errbuf, PCAP_ERRBUF_SIZE))
{ {
// That failed; log a message and give up. // That failed; log a message and give up.
rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf); rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);
return -1; return -1;
} }
return 0; return 0;
error: error:
if (rpcapd_discard(pars->sockctrl, pars->ssl, plen) == -1) if (rpcapd_discard(pars->sockctrl, pars->ssl, plen) == -1)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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