Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ping do not bark even if ipsec policy setting for "rout...



details:   https://anonhg.NetBSD.org/src/rev/0ff8acdc79df
branches:  trunk
changeset: 474368:0ff8acdc79df
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Jul 04 13:27:03 1999 +0000

description:
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.

diffstat:

 sbin/ping/ping.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 1400088a9709 -r 0ff8acdc79df sbin/ping/ping.c
--- a/sbin/ping/ping.c  Sun Jul 04 12:51:30 1999 +0000
+++ b/sbin/ping/ping.c  Sun Jul 04 13:27:03 1999 +0000
@@ -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 <sys/cdefs.h>
 #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 <stdio.h>
@@ -555,8 +555,13 @@
                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



Home | Main Index | Thread Index | Old Index