Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 record socket * associated with secpolicy



details:   https://anonhg.NetBSD.org/src/rev/0cce85b2e039
branches:  trunk
changeset: 551723:0cce85b2e039
user:      itojun <itojun%NetBSD.org@localhost>
date:      Wed Sep 10 22:29:27 2003 +0000

description:
record socket * associated with secpolicy

diffstat:

 sys/netinet6/ipsec.c |  7 +++++--
 sys/netinet6/ipsec.h |  3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (57 lines):

diff -r 82c8b7c14521 -r 0cce85b2e039 sys/netinet6/ipsec.c
--- a/sys/netinet6/ipsec.c      Wed Sep 10 21:40:02 2003 +0000
+++ b/sys/netinet6/ipsec.c      Wed Sep 10 22:29:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec.c,v 1.77 2003/09/07 15:59:36 itojun Exp $        */
+/*     $NetBSD: ipsec.c,v 1.78 2003/09/10 22:29:27 itojun Exp $        */
 /*     $KAME: ipsec.c,v 1.136 2002/05/19 00:36:39 itojun Exp $ */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.77 2003/09/07 15:59:36 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.78 2003/09/10 22:29:27 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1114,11 +1114,13 @@
                in->policy = IPSEC_POLICY_ENTRUST;
                in->dir = IPSEC_DIR_INBOUND;
                in->readonly = 1;
+               in->so = so;
 
                out->state = IPSEC_SPSTATE_ALIVE;
                out->policy = IPSEC_POLICY_ENTRUST;
                out->dir = IPSEC_DIR_OUTBOUND;
                out->readonly = 1;
+               out->so = so;
 
                initialized++;
        }
@@ -1249,6 +1251,7 @@
        dst->state = src->state;
        dst->policy = src->policy;
        dst->dir = src->dir;
+       dst->so = src->so;
        /* do not touch the refcnt fields */
 
        return dst;
diff -r 82c8b7c14521 -r 0cce85b2e039 sys/netinet6/ipsec.h
--- a/sys/netinet6/ipsec.h      Wed Sep 10 21:40:02 2003 +0000
+++ b/sys/netinet6/ipsec.h      Wed Sep 10 22:29:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec.h,v 1.38 2003/09/07 15:50:43 itojun Exp $        */
+/*     $NetBSD: ipsec.h,v 1.39 2003/09/10 22:29:28 itojun Exp $        */
 /*     $KAME: ipsec.h,v 1.51 2001/08/05 04:52:58 itojun Exp $  */
 
 /*
@@ -82,6 +82,7 @@
                                 * 1 - 0x3fff are reserved for user operation.
                                 * 0 are reserved.  Others are for kernel use.
                                 */
+       struct socket *so;              /* backpointer to per-socket policy */
        u_int state;                    /* 0: dead, others: alive */
 #define IPSEC_SPSTATE_DEAD     0
 #define IPSEC_SPSTATE_ALIVE    1



Home | Main Index | Thread Index | Old Index