summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-11-08 11:50:34 -0800
committerGuy Harris <guy@alum.mit.edu>2019-11-09 19:12:31 -0800
commitea444b97dc9a999b926b452969a31ef0cd8a4a53 (patch)
treee9a7410fc043393198b0e40a72922e583d283178
parent1ae53c3252e71553e3bad659bd19caca80a10796 (diff)
downloadlibpcap-ea444b97dc9a999b926b452969a31ef0cd8a4a53.tar.gz
Let the common pcap code handle "setting the direction isn't supported".
Just set the "set direction" operation pointer to null. (cherry picked from commit 108b0eecc5c876c4ce93e60207146add85fc978e)
-rw-r--r--pcap-sita.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/pcap-sita.c b/pcap-sita.c
index 63fd11d0..19311b5b 100644
--- a/pcap-sita.c
+++ b/pcap-sita.c
@@ -915,12 +915,6 @@ static int pcap_setfilter_acn(pcap_t *handle, struct bpf_program *bpf) {
return 0;
}
-static int pcap_setdirection_acn(pcap_t *handle, pcap_direction_t d) {
- pcap_snprintf(handle->errbuf, sizeof(handle->errbuf),
- "Setting direction is not supported on ACN adapters");
- return -1;
-}
-
static int acn_read_n_bytes_with_timeout(pcap_t *handle, int count) {
struct timeval tv;
int retval, fd;
@@ -997,7 +991,7 @@ static int pcap_activate_sita(pcap_t *handle) {
handle->inject_op = pcap_inject_acn;
handle->setfilter_op = pcap_setfilter_acn;
- handle->setdirection_op = pcap_setdirection_acn;
+ handle->setdirection_op = NULL; /* Not implemented */
handle->set_datalink_op = NULL; /* can't change data link type */
handle->getnonblock_op = pcap_getnonblock_fd;
handle->setnonblock_op = pcap_setnonblock_fd;