Don't register IOCTLs with capsicum when there is no valid file descriptor.
This fixes tcpdump when using mlx5_X devices. Differential Revision: https://reviews.freebsd.org/D18499 Reviewed by: kib@, slavash@, oshogbo@ MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
23c25bd8b1
commit
46caeeca78
@ -1915,7 +1915,7 @@ main(int argc, char **argv)
|
||||
if (pcap_setfilter(pd, &fcode) < 0)
|
||||
error("%s", pcap_geterr(pd));
|
||||
#ifdef HAVE_CAPSICUM
|
||||
if (RFileName == NULL && VFileName == NULL) {
|
||||
if (RFileName == NULL && VFileName == NULL && pcap_fileno(pd) != -1) {
|
||||
static const unsigned long cmds[] = { BIOCGSTATS, BIOCROTZBUF };
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user