]> The Tcpdump Group git mirrors - tcpdump/commit
make pcap_setdirection() call conditional, GH #252
authorDenis Ovsienko <[email protected]>
Tue, 15 Oct 2013 11:01:28 +0000 (15:01 +0400)
committerDenis Ovsienko <[email protected]>
Tue, 15 Oct 2013 11:01:28 +0000 (15:01 +0400)
commit17d961421c6e263d3a2f114b89994f3e32c90a2e
tree5bc317c488a65f507da297d4438d35e8177588d6
parent03b1b422b15d19c723d228c74d444127abba38be
make pcap_setdirection() call conditional, GH #252

pcap_setdirection() succeeds only for particular combination of
platform, interface type and direction. Calling it on each invocation
(with PCAP_D_INOUT by default) was wrong: some interfaces are two-way,
others are one-way, and pcap_setdirection() has its own idea what it
supports and what doesn't. In particular, it was impossible to do any
capture on nflog interface in Linux since commit df7d24f. Now the
function is only called on -P flag.
tcpdump.c