mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56675
@ -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…
Reference in New Issue
Block a user