Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec Remove a dummy reference to XF_IP4...



details:   https://anonhg.NetBSD.org/src/rev/a89367c61820
branches:  trunk
changeset: 318853:a89367c61820
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon May 07 09:33:51 2018 +0000
description:
Remove a dummy reference to XF_IP4, explain briefly why we don't use
ipe4_xformsw, and remove unused includes.

diffstat:

 sys/netipsec/ipsec_output.c |   8 ++------
 sys/netipsec/xform_ipip.c   |  19 ++++++++++---------
 2 files changed, 12 insertions(+), 15 deletions(-)

diffs (74 lines):

diff -r fa74fe46a653 -r a89367c61820 sys/netipsec/ipsec_output.c
--- a/sys/netipsec/ipsec_output.c       Mon May 07 09:25:04 2018 +0000
+++ b/sys/netipsec/ipsec_output.c       Mon May 07 09:33:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec_output.c,v 1.77 2018/05/07 09:25:04 maxv Exp $   */
+/*     $NetBSD: ipsec_output.c,v 1.78 2018/05/07 09:33:51 maxv Exp $   */
 
 /*
  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.77 2018/05/07 09:25:04 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.78 2018/05/07 09:33:51 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -534,10 +534,6 @@
        /* Do the appropriate encapsulation, if necessary */
        if (isr->saidx.mode == IPSEC_MODE_TUNNEL || /* Tunnel requ'd */
            dst->sa.sa_family != AF_INET ||         /* PF mismatch */
-#if 0
-           (sav->flags & SADB_X_SAFLAGS_TUNNEL) || /* Tunnel requ'd */
-           sav->tdb_xform->xf_type == XF_IP4 ||    /* ditto */
-#endif
            (dst->sa.sa_family == AF_INET &&        /* Proxy */
             dst->sin.sin_addr.s_addr != INADDR_ANY &&
             dst->sin.sin_addr.s_addr != ip->ip_dst.s_addr)) {
diff -r fa74fe46a653 -r a89367c61820 sys/netipsec/xform_ipip.c
--- a/sys/netipsec/xform_ipip.c Mon May 07 09:25:04 2018 +0000
+++ b/sys/netipsec/xform_ipip.c Mon May 07 09:33:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ipip.c,v 1.73 2018/05/07 09:25:04 maxv Exp $     */
+/*     $NetBSD: xform_ipip.c,v 1.74 2018/05/07 09:33:51 maxv Exp $     */
 /*     $FreeBSD: xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $  */
 /*     $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */
 
@@ -39,26 +39,27 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.73 2018/05/07 09:25:04 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.74 2018/05/07 09:33:51 maxv Exp $");
 
-/*
- * IP-inside-IP processing
- */
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
 #endif
 
+/*
+ * IP-inside-IP processing.
+ *
+ * The input point is encapsw{4,6}, called via the encap callback. The
+ * output point is ipip_output, called directly. XF_IP4 has no more
+ * meaning here, ipe4_xformsw is dummy.
+ */
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/mbuf.h>
-#include <sys/socket.h>
 #include <sys/kernel.h>
 #include <sys/protosw.h>
-#include <sys/sysctl.h>
 
 #include <net/if.h>
-#include <net/route.h>
-#include <net/netisr.h>
 
 #include <netinet/in.h>
 #include <netinet/in_systm.h>



Home | Main Index | Thread Index | Old Index