Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 remove extra code mistakenly committed



details:   https://anonhg.NetBSD.org/src/rev/5bb7cef717b2
branches:  trunk
changeset: 570773:5bb7cef717b2
user:      itojun <itojun%NetBSD.org@localhost>
date:      Wed Oct 27 23:16:56 2004 +0000

description:
remove extra code mistakenly committed

diffstat:

 sys/netinet6/ipsec.c |  32 ++------------------------------
 1 files changed, 2 insertions(+), 30 deletions(-)

diffs (81 lines):

diff -r 4675eb38f328 -r 5bb7cef717b2 sys/netinet6/ipsec.c
--- a/sys/netinet6/ipsec.c      Wed Oct 27 23:10:13 2004 +0000
+++ b/sys/netinet6/ipsec.c      Wed Oct 27 23:16:56 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec.c,v 1.98 2004/10/27 22:26:50 itojun Exp $        */
+/*     $NetBSD: ipsec.c,v 1.99 2004/10/27 23:16:56 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.98 2004/10/27 22:26:50 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.99 2004/10/27 23:16:56 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1689,11 +1689,6 @@
                         */
                        level = IPSEC_LEVEL_USE;
                        break;
-               case IPPROTO_IPV4:
-               case IPPROTO_IPV6:
-                       /* should never go into here */
-                       level = IPSEC_LEVEL_REQUIRE;
-                       break;
                default:
                        panic("ipsec_get_reqlevel: "
                                "Illegal protocol defined %u\n",
@@ -1786,13 +1781,6 @@
                         * should always be treated as being in "use" level.
                         */
                        break;
-               case IPPROTO_IPV4:
-               case IPPROTO_IPV6:
-                       /*
-                        * XXX what shall we do, until introducing more complex
-                        * policy checking code?
-                        */
-                       break;
                }
        }
 
@@ -1966,11 +1954,6 @@
                case IPPROTO_IPCOMP:
                        clen = sizeof(struct ipcomp);
                        break;
-               case IPPROTO_IPV4:
-               case IPPROTO_IPV6:
-                       /* the next "if" clause will compute it */
-                       clen = 0;
-                       break;
                }
 
                if (isr->saidx.mode == IPSEC_MODE_TUNNEL) {
@@ -2670,9 +2653,6 @@
                        case IPSEC_LEVEL_USE:
                                continue;
                        case IPSEC_LEVEL_REQUIRE:
-                               if (isr->saidx.proto == AF_INET ||
-                                   isr->saidx.proto == AF_INET6)
-                                       break;
                                /* must be not reached here. */
                                panic("ipsec4_output: no SA found, but required.");
                        }
@@ -2788,14 +2768,6 @@
                                goto bad;
                        }
                        break;
-               case IPPROTO_IPV4:
-                       break;
-               case IPPROTO_IPV6:
-                       ipseclog((LOG_ERR, "ipsec4_output: "
-                           "family mismatched between inner and outer "
-                           "header\n"));
-                       error = EAFNOSUPPORT;
-                       goto bad;
                default:
                        ipseclog((LOG_ERR,
                            "ipsec4_output: unknown ipsec protocol %d\n",



Home | Main Index | Thread Index | Old Index