Avoid verbose error messages when ipsec initialization for sockets failed
usually, and print it only when debug is enabled. (This always happens when kernel is configured without IPSEC option.)
This commit is contained in:
parent
01f6cfbae0
commit
f669e3af26
@ -1256,7 +1256,8 @@ ipsecsetup(sep)
|
||||
buf = ipsec_set_policy(policy_in, strlen(policy_in));
|
||||
if (buf != NULL) {
|
||||
if (setsockopt(sep->se_fd, level, opt,
|
||||
buf, ipsec_get_policylen(buf)) < 0) {
|
||||
buf, ipsec_get_policylen(buf)) < 0 &&
|
||||
debug != 0) {
|
||||
syslog(LOG_ERR,
|
||||
"%s/%s: ipsec initialization failed; %s",
|
||||
sep->se_service, sep->se_proto,
|
||||
@ -1271,7 +1272,8 @@ ipsecsetup(sep)
|
||||
buf = ipsec_set_policy(policy_out, strlen(policy_out));
|
||||
if (buf != NULL) {
|
||||
if (setsockopt(sep->se_fd, level, opt,
|
||||
buf, ipsec_get_policylen(buf)) < 0) {
|
||||
buf, ipsec_get_policylen(buf)) < 0 &&
|
||||
debug != 0) {
|
||||
syslog(LOG_ERR,
|
||||
"%s/%s: ipsec initialization failed; %s",
|
||||
sep->se_service, sep->se_proto,
|
||||
|
Loading…
x
Reference in New Issue
Block a user