Date: Wed, 19 Dec 2018 08:50:10 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342216 - stable/11/contrib/tcpdump Message-ID: <201812190850.wBJ8oA5B024661@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Dec 19 08:50:10 2018 New Revision: 342216 URL: https://svnweb.freebsd.org/changeset/base/342216 Log: MFC r341844: 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@ Sponsored by: Mellanox Technologies Modified: stable/11/contrib/tcpdump/tcpdump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/tcpdump/tcpdump.c ============================================================================== --- stable/11/contrib/tcpdump/tcpdump.c Wed Dec 19 08:49:07 2018 (r342215) +++ stable/11/contrib/tcpdump/tcpdump.c Wed Dec 19 08:50:10 2018 (r342216) @@ -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 }; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812190850.wBJ8oA5B024661>