From: Guy Harris Date: Thu, 10 Jul 2014 22:51:35 +0000 (-0700) Subject: Fix copy-and-pasteos. X-Git-Tag: libpcap-1.7.0-bp~1^2~30 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/9b67fb6b670d255f496fcdf280a7cf8692137ea2 Fix copy-and-pasteos. --- diff --git a/pcap-linux.c b/pcap-linux.c index 09595e92..add471a1 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -2482,7 +2482,7 @@ pcap_setfilter_linux_common(pcap_t *handle, struct bpf_program *filter, if (reset_kernel_filter(handle) == -1) { snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "can't remove kernel filter: %s", - pcap_strerror(save_errno)); + pcap_strerror(errno)); err = -2; /* fatal error */ } } @@ -6047,13 +6047,13 @@ set_kernel_filter(pcap_t *handle, struct sock_fprog *fcode) if (save_mode == -1) { snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "can't get FD flags when changing filter: %s", - pcap_strerror(save_errno)); + pcap_strerror(errno)); return -2; } if (fcntl(handle->fd, F_SETFL, save_mode | O_NONBLOCK) < 0) { snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "can't set nonblocking mode when changing filter: %s", - pcap_strerror(save_errno)); + pcap_strerror(errno)); return -2; } while (recv(handle->fd, &drain, sizeof drain, MSG_TRUNC) >= 0) @@ -6107,7 +6107,7 @@ set_kernel_filter(pcap_t *handle, struct sock_fprog *fcode) if (reset_kernel_filter(handle) == -1) { snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "can't remove kernel total filter: %s", - pcap_strerror(save_errno)); + pcap_strerror(errno)); return -2; /* fatal error */ }