REJECT("Cannot use TransTPROXY without any valid TransPort or "
"TransListenAddress.");
}
- /* Friendly suggestion about running as root initially. */
- if (!options->User) {
- log_warn(LD_CONFIG,
- "You have enabled TransTPROXY but have not specified the "
- "\"User\" option. TransTPROXY will not function without "
- "root privileges.");
- }
}
#else
if (options->TransPort_set || options->TransTPROXY)
if (options->TransTPROXY && type == CONN_TYPE_AP_TRANS_LISTENER) {
int one = 1;
if (setsockopt(s, SOL_IP, IP_TRANSPARENT, &one, sizeof(one)) < 0) {
+ const char *extra = "";
int e = tor_socket_errno(s);
- log_warn(LD_NET, "Error setting IP_TRANSPARENT flag: %s",
- tor_socket_strerror(e));
+ if (e == EPERM)
+ extra = "TransTPROXY requires root privileges or similar"
+ " capabilities.";
+ log_warn(LD_NET, "Error setting IP_TRANSPARENT flag: %s.%s",
+ tor_socket_strerror(e), extra);
}
}
#endif