summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-01-27 14:46:15 +0000
committershin <shin@FreeBSD.org>2000-01-27 14:46:15 +0000
commit1427d0852ce293ef9997d38bcd4281a28bf261c5 (patch)
treef28f87e31a20693da8bd39845558038214def0c3
parentd75f204b28cb3135261b939394bff5ad4151818f (diff)
downloadFreeBSD-src-1427d0852ce293ef9997d38bcd4281a28bf261c5.zip
FreeBSD-src-1427d0852ce293ef9997d38bcd4281a28bf261c5.tar.gz
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.)
-rw-r--r--usr.sbin/inetd/inetd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 06bad40..f6e2ba2 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -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,
OpenPOWER on IntegriCloud