# ./src/or/tor -Aug 22 20:14:56.657 [notice] Tor v0.2.9.1-alpha-dev (git-b3f43a22ab921ce6) running on NetBSD with Libevent 2.1.5-beta, OpenSSL 1.0.2h and Zlib 1.2.3.
I don't have a NetBSD machine available, but I'm guessing it has something to do with #19449 (moved). Maybe the change enabled transparent proxying by default on NetBSD where it was previously disabled?
I'll submit a patch that cleans up that part of the code to improve readability and fix the incorrect preprocessor variable for detecting Linux platforms (linux instead of __linux__). Because i don't have a NetBSD machine I'm unsure which firewall system is used on NetBSD. It seems the rest of the Tor code assumes NetBSD is similar to OpenBSD...so i guess it should use pf-divert?
I don't have a NetBSD machine available,
[...]
Because i don't have a NetBSD machine I'm unsure which firewall system is used on NetBSD.
It seems the rest of the Tor code assumes NetBSD is similar to OpenBSD...so i guess it
should use pf-divert?
I'm uncertain, it might be built in. I actually use ipf (pf and npf are also available)
I'll try your patch soon unless it's already been pushed up...
I don't have a NetBSD machine available,
[...]
Because i don't have a NetBSD machine I'm unsure which firewall system is used on NetBSD.
It seems the rest of the Tor code assumes NetBSD is similar to OpenBSD...so i guess it
should use pf-divert?
I'm uncertain, it might be built in. I actually use ipf (pf and npf are also available)
I'll try your patch soon unless it's already been pushed up...
I don't expect the patch to solve your issue. It was just meant as premature cleanup of related code before actually fixing the issue.
Trac: Summary: Tor v0.2.9.1-alpha-dev (git-b3f43a22ab921ce6) - failing one test on NetBSD to Tor v0.2.9.1-alpha-dev (git-b3f43a22ab921ce6) - failing options/validate__transproxy test on NetBSD
Hey, does Tor commit ff3e08f2 have anything to do with this? It's about NetBSD and it's right next to a line about transproxy. Maybe there is someplace in the real code that is missing an || defined(__NetBSD__) entry?
I couldn't figure out from the commit whether there's a trac ticket that goes with it though.
The options tests are unfortunately quite fragile, because they depend on the exact log output. (For example, they could be failing simply because the platform name is different.)
It might help to have a unit test log at a useful verbosity level.
Try src/test/test --debug or similar.
I believe I had tried applying the patch 3 months back. Since then I have continued tracking the latest tor sources, so the debug output is against the latest git HEAD version - Tor 0.3.0.0-alpha-dev (git-0980787f91cfc420).
# ./src/or/tor -Aug 22 20:14:56.657 [notice] Tor v0.2.9.1-alpha-dev (git-b3f43a22ab921ce6) running on NetBSD with Libevent 2.1.5-beta, OpenSSL 1.0.2h and Zlib 1.2.3.
Worth doing in 0.2.9.x if somebody can track down the issue. But it doesn't need to block a release candidate -- especially if we think there's a good chance that it's a bug in our unit tests, rather than a bug in actual Tor code?
Worth doing in 0.2.9.x if somebody can track down the issue. But it doesn't need to block a release candidate -- especially if we think there's a good chance that it's a bug in our unit tests, rather than a bug in actual Tor code?
Given it's in an options_validate test, on a non-Linux/macOS/Windows platform, it is almost certainly a bug in the unit tests. It could be as simple as expecting support for a feature on a platform where it does not exist.
However, it could also be a bug in that platform's implementation of the feature.
In e7ade23f9723f55a504ebd8279cbadf0aca108c6 I increased the verborsity of the output of the test, and now on the buildbot I see:
FAIL src/test/test_options.c:1089: Expected NULL but got 'ipfw is a FreeBSD-specificand OS X/Darwin-specific feature.'
a) "specificand" is a typo.
b) Does netbsd support ipfw or not? We imply "yes" in test_options.c, but "no" in our definition of KERNEL_MAY_SUPPORT_IPFW. Which of these is correct?
b) Does netbsd support ipfw or not? We imply "yes" in test_options.c, but "no" in our definition of KERNEL_MAY_SUPPORT_IPFW. Which of these is correct?
I am pretty sure the answer is no. NetBSD has some support for pf (OpenBSD origins), ipf (independent project? Darren Reed author - no longer under development) and npf which is the new official mechanism in NetBSD as I understand.
I've never used pf, I currently still use ipf only because too lazy to re-visit my rule-sets and replace scripts, etc.
I've confirmed latest source compile [0.3.0.0-alpha-dev (git-f2445fc608fcb71c)] tests clean. I did not back up and test 0.2.9.0-alpha-dev as I am tracking only active dev source head.