aboutsummaryrefslogtreecommitdiff
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2014-11-10 20:55:35 +0000
committerDenis Ovsienko <denis@ovsienko.info>2014-11-10 21:06:06 +0000
commit32527e54c5b6a48b157d15234979c9f2ffb9e21c (patch)
tree6bff02d34d0852d84dd573c3c941dd7239c26bab /pcap-linux.c
parent29ddd430b98024b58d808bad225b572d856e985e (diff)
fix compiling with SO_BPF_EXTENSIONS
Add a missing parenthesis and use socklen_t for the getsockopt() argument to address a pointer type warning.
Diffstat (limited to 'pcap-linux.c')
-rw-r--r--pcap-linux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index 5d63e849..8561c97e 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -3016,7 +3016,8 @@ activate_new(pcap_t *handle)
int err = 0;
struct packet_mreq mr;
#ifdef SO_BPF_EXTENSIONS
- int bpf_extensions, len;
+ int bpf_extensions;
+ socklen_t len;
#endif
/*
@@ -3355,7 +3356,7 @@ activate_new(pcap_t *handle)
* by the OS? Is that possible?)
*/
if (getsockopt(sock_fd, SOL_SOCKET, SO_BPF_EXTENSIONS,
- &bpf_extensions, &len == 0) {
+ &bpf_extensions, &len) == 0) {
if (bpf_extensions >= SKF_AD_VLAN_TAG_PRESENT) {
/*
* Yes, we can. Request that we do so.