Skip to content

Commit

Permalink
Fix copy-and-pasteos.
Browse files Browse the repository at this point in the history
  • Loading branch information
guyharris committed Jul 10, 2014
1 parent 2abf52b commit 9b67fb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pcap-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 */
}

Expand Down

0 comments on commit 9b67fb6

Please sign in to comment.