From 4cd93a1723de169a457ec1b217484325608508ba Mon Sep 17 00:00:00 2001 From: itojun Date: Sun, 4 Jul 1999 13:27:03 +0000 Subject: [PATCH] do not bark even if ipsec policy setting for "route flushing 127.0.0.1" ping socket is not successful. it usually means that the kernel is not ipsec ready, and in that case this should be just okay. --- sbin/ping/ping.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 7756bab45758..bbfcf01d9ac8 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $NetBSD: ping.c,v 1.51 1999/07/03 15:09:51 kleink Exp $ */ +/* $NetBSD: ping.c,v 1.52 1999/07/04 13:27:03 itojun Exp $ */ /* * Copyright (c) 1989, 1993 @@ -62,7 +62,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ping.c,v 1.51 1999/07/03 15:09:51 kleink Exp $"); +__RCSID("$NetBSD: ping.c,v 1.52 1999/07/04 13:27:03 itojun Exp $"); #endif #include @@ -555,8 +555,13 @@ main(int argc, char *argv[]) err(1, "malloc"); if ((len = ipsec_set_policy(buf, len, "bypass")) < 0) errx(1, ipsec_strerror()); - if (setsockopt(sloop, IPPROTO_IP, IP_IPSEC_POLICY, buf, len) < 0) + if (setsockopt(sloop, IPPROTO_IP, IP_IPSEC_POLICY, buf, len) < 0) { +#if 0 warnx("ipsec is not configured"); +#else + /* ignore it, should be okay */ +#endif + } free(buf); } #else