aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authorYoshinobu Inoue <shin@FreeBSD.org>2000-01-27 14:46:15 +0000
committerYoshinobu Inoue <shin@FreeBSD.org>2000-01-27 14:46:15 +0000
commitf669e3af26f7fe13d4546b35c5682a641d60e7bf (patch)
treef5d5c6d688fc374b37d63a9b22048286206964a2 /usr.sbin/inetd/inetd.c
parent01f6cfbae09d900359166effc766dbfb943ac44f (diff)
downloadsrc-f669e3af26f7fe13d4546b35c5682a641d60e7bf.tar.gz
src-f669e3af26f7fe13d4546b35c5682a641d60e7bf.zip
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.)
Notes
Notes: svn path=/head/; revision=56675
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-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 06bad40e8f0d..f6e2ba2c3a55 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,