Source-Changes-HG archive

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

[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon Some logging improvements.



details:   https://anonhg.NetBSD.org/src/rev/397d42437024
branches:  trunk
changeset: 786038:397d42437024
user:      tteras <tteras%NetBSD.org@localhost>
date:      Fri Apr 12 09:53:10 2013 +0000

description:
Some logging improvements.

diffstat:

 crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c |  5 +++--
 crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c |  7 ++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (68 lines):

diff -r b6eaaba5ff00 -r 397d42437024 crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c
--- a/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c   Fri Apr 12 03:33:17 2013 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c   Fri Apr 12 09:53:10 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grabmyaddr.c,v 1.30 2013/02/05 11:36:17 tteras Exp $   */
+/*     $NetBSD: grabmyaddr.c,v 1.31 2013/04/12 09:53:10 tteras Exp $   */
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
  * Copyright (C) 2008 Timo Teras <timo.teras%iki.fi@localhost>.
@@ -764,6 +764,7 @@
        case RTM_ADD:
        case RTM_DELETE:
        case RTM_CHANGE:
+       case RTM_GET:
        case RTM_MISS:
        case RTM_IFINFO:
 #ifdef RTM_OIFINFO
@@ -779,7 +780,7 @@
                break;
        default:
                plog(LLV_WARNING, LOCATION, NULL,
-                    "unrecognized route message with rtm_type: %d",
+                    "unrecognized route message with rtm_type: %d\n",
                     rtm->rtm_type);
                break;
        }
diff -r b6eaaba5ff00 -r 397d42437024 crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
--- a/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c   Fri Apr 12 03:33:17 2013 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c   Fri Apr 12 09:53:10 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isakmp_inf.c,v 1.49 2013/01/24 06:47:50 tteras Exp $   */
+/*     $NetBSD: isakmp_inf.c,v 1.50 2013/04/12 09:53:10 tteras Exp $   */
 
 /* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */
 
@@ -1116,6 +1116,7 @@
        u_int64_t created;
        size_t i;
        caddr_t mhp[SADB_EXT_MAX + 1];
+       unsigned num_purged = 0;
 
        plog(LLV_DEBUG2, LOCATION, NULL,
                 "purge_ipsec_spi:\n");
@@ -1172,6 +1173,7 @@
 
                plog(LLV_DEBUG2, LOCATION, NULL, "src: %s\n", saddr2str(src));
                plog(LLV_DEBUG2, LOCATION, NULL, "dst: %s\n", saddr2str(dst));
+               plog(LLV_DEBUG2, LOCATION, NULL, "spi: %u\n", ntohl(sa->sadb_sa_spi));
 
                /* XXX n^2 algorithm, inefficient */
 
@@ -1210,6 +1212,7 @@
                                "purged IPsec-SA proto_id=%s spi=%u.\n",
                                s_ipsecdoi_proto(proto),
                                ntohl(spi[i]));
+                       num_purged++;
                }
 
                msg = next;
@@ -1217,6 +1220,8 @@
 
        if (buf)
                vfree(buf);
+
+       plog(LLV_DEBUG, LOCATION, NULL, "purged %u SAs.\n", num_purged);
 }
 
 /*



Home | Main Index | Thread Index | Old Index