Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec Remove unused typedef, remove unus...



details:   https://anonhg.NetBSD.org/src/rev/cca2ac0735b2
branches:  trunk
changeset: 318367:cca2ac0735b2
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Apr 19 08:16:44 2018 +0000
description:
Remove unused typedef, remove unused arguments from _ipip_input, sync
comment with reality, and change panic message.

diffstat:

 sys/netipsec/xform_ipip.c |  24 ++++++++++--------------
 1 files changed, 10 insertions(+), 14 deletions(-)

diffs (82 lines):

diff -r fc807d36a904 -r cca2ac0735b2 sys/netipsec/xform_ipip.c
--- a/sys/netipsec/xform_ipip.c Thu Apr 19 07:58:26 2018 +0000
+++ b/sys/netipsec/xform_ipip.c Thu Apr 19 08:16:44 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ipip.c,v 1.64 2018/04/18 06:43:10 maxv Exp $     */
+/*     $NetBSD: xform_ipip.c,v 1.65 2018/04/19 08:16:44 maxv Exp $     */
 /*     $FreeBSD: src/sys/netipsec/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,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.64 2018/04/18 06:43:10 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.65 2018/04/19 08:16:44 maxv Exp $");
 
 /*
  * IP-inside-IP processing
@@ -87,20 +87,18 @@
 /* XXX IPCOMP */
 #define        M_IPSEC (M_AUTHIPHDR|M_AUTHIPDGM|M_DECRYPTED)
 
-typedef void pr_in_input_t(struct mbuf *m, ...);
-
 int ipip_allow = 0;
 percpu_t *ipipstat_percpu;
 
 void ipe4_attach(void);
 
-static void _ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp);
+static void _ipip_input(struct mbuf *, int);
 
 #ifdef INET6
 int
 ip4_input6(struct mbuf **m, int *offp, int proto, void *eparg __unused)
 {
-       _ipip_input(*m, *offp, NULL);
+       _ipip_input(*m, *offp);
        return IPPROTO_DONE;
 }
 #endif
@@ -109,18 +107,16 @@
 void
 ip4_input(struct mbuf *m, int off, int proto, void *eparg __unused)
 {
-       _ipip_input(m, off, NULL);
+       _ipip_input(m, off);
 }
 #endif
 
 /*
- * ipip_input gets called when we receive an IP{46} encapsulated packet,
- * either because we got it at a real interface, or because AH or ESP
- * were being used in tunnel mode (in which case the rcvif element will
- * contain the address of the encX interface associated with the tunnel).
+ * _ipip_input gets called when we receive an IP{46} encapsulated packet,
+ * because AH or ESP were being used in tunnel mode.
  */
 static void
-_ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp)
+_ipip_input(struct mbuf *m, int iphlen)
 {
        register struct sockaddr_in *sin;
        register struct ifnet *ifp;
@@ -181,7 +177,7 @@
                break;
 #endif
        default:
-               panic("%s: unknown ip version %u (outer)", __func__, v >> 4);
+               panic("%s: impossible (1)", __func__);
        }
 
        /* Remove outer IP header */
@@ -252,7 +248,7 @@
                break;
 #endif
        default:
-               panic("%s: unknown ip version %u (inner)", __func__, v>>4);
+               panic("%s: impossible (2)", __func__);
        }
 
        /* Check for local address spoofing. */



Home | Main Index | Thread Index | Old Index