Source-Changes-HG archive

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

[src/trunk]: src/sys Rename ipsec4_forward -> ipsec_mtu, and swi...



details:   https://anonhg.NetBSD.org/src/rev/f7aa416de322
branches:  trunk
changeset: 318954:f7aa416de322
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu May 10 05:08:53 2018 +0000
description:
Rename ipsec4_forward -> ipsec_mtu, and switch to void.

diffstat:

 sys/netinet/ip_input.c              |   6 +++---
 sys/netipsec/ipsec.c                |  13 ++++++-------
 sys/netipsec/ipsec.h                |   5 +++--
 sys/rump/librump/rumpnet/net_stub.c |   6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

diffs (132 lines):

diff -r 83e16c7bcc57 -r f7aa416de322 sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Thu May 10 03:41:00 2018 +0000
+++ b/sys/netinet/ip_input.c    Thu May 10 05:08:53 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.381 2018/04/26 19:22:17 maxv Exp $      */
+/*     $NetBSD: ip_input.c,v 1.382 2018/05/10 05:08:53 maxv Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.381 2018/04/26 19:22:17 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.382 2018/05/10 05:08:53 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1468,7 +1468,7 @@
                }
 #ifdef IPSEC
                if (ipsec_used)
-                       (void)ipsec4_forward(mcopy, &destmtu);
+                       ipsec_mtu(mcopy, &destmtu);
 #endif
                IP_STATINC(IP_STAT_CANTFRAG);
                break;
diff -r 83e16c7bcc57 -r f7aa416de322 sys/netipsec/ipsec.c
--- a/sys/netipsec/ipsec.c      Thu May 10 03:41:00 2018 +0000
+++ b/sys/netipsec/ipsec.c      Thu May 10 05:08:53 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.161 2018/04/29 11:51:08 maxv Exp $ */
+/* $NetBSD: ipsec.c,v 1.162 2018/05/10 05:08:53 maxv Exp $ */
 /* $FreeBSD: ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */
 /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
 
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.161 2018/04/29 11:51:08 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.162 2018/05/10 05:08:53 maxv Exp $");
 
 /*
  * IPsec controller part.
@@ -737,8 +737,8 @@
  *
  * XXX: And what if the MTU goes negative?
  */
-int
-ipsec4_forward(struct mbuf *m, int *destmtu)
+void
+ipsec_mtu(struct mbuf *m, int *destmtu)
 {
        struct secpolicy *sp;
        size_t ipsechdr;
@@ -747,14 +747,14 @@
        sp = ipsec_getpolicybyaddr(m, IPSEC_DIR_OUTBOUND, IP_FORWARDING,
            &error);
        if (sp == NULL) {
-               return EINVAL;
+               return;
        }
 
        /* Count IPsec header size. */
        ipsechdr = ipsec_sp_hdrsiz(sp, m);
 
        /*
-        * Find the correct route for outer IPv4 header, compute tunnel MTU.
+        * Find the correct route for outer IP header, compute tunnel MTU.
         */
        if (sp->req) {
                struct secasvar *sav;
@@ -776,7 +776,6 @@
                }
        }
        KEY_SP_UNREF(&sp);
-       return 0;
 }
 
 static int
diff -r 83e16c7bcc57 -r f7aa416de322 sys/netipsec/ipsec.h
--- a/sys/netipsec/ipsec.h      Thu May 10 03:41:00 2018 +0000
+++ b/sys/netipsec/ipsec.h      Thu May 10 05:08:53 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec.h,v 1.80 2018/05/01 08:34:08 maxv Exp $  */
+/*     $NetBSD: ipsec.h,v 1.81 2018/05/10 05:08:53 maxv Exp $  */
 /*     $FreeBSD: ipsec.h,v 1.2.4.2 2004/02/14 22:23:23 bms Exp $       */
 /*     $KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $  */
 
@@ -257,7 +257,8 @@
 struct inpcb;
 int ipsec4_output(struct mbuf *, struct inpcb *, int, u_long *, bool *, bool *);
 int ipsec4_input(struct mbuf *, int);
-int ipsec4_forward(struct mbuf *, int *);
+
+void ipsec_mtu(struct mbuf *, int *);
 
 struct inpcb;
 int ipsec_init_pcbpolicy(struct socket *so, struct inpcbpolicy **);
diff -r 83e16c7bcc57 -r f7aa416de322 sys/rump/librump/rumpnet/net_stub.c
--- a/sys/rump/librump/rumpnet/net_stub.c       Thu May 10 03:41:00 2018 +0000
+++ b/sys/rump/librump/rumpnet/net_stub.c       Thu May 10 05:08:53 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net_stub.c,v 1.34 2018/05/05 23:42:00 christos Exp $   */
+/*     $NetBSD: net_stub.c,v 1.35 2018/05/10 05:08:53 maxv Exp $       */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.34 2018/05/05 23:42:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.35 2018/05/10 05:08:53 maxv Exp $");
 
 #include <sys/mutex.h>
 #include <sys/param.h>
@@ -97,12 +97,12 @@
 __weak_alias(esp6_ctlinput,rumpnet_stub);
 __weak_alias(ipsec4_output,rumpnet_stub);
 __weak_alias(ipsec4_common_input,rumpnet_stub);
-__weak_alias(ipsec4_forward,rumpnet_stub);
 __weak_alias(ipsec4_input,rumpnet_stub);
 __weak_alias(ipsec6_common_input,rumpnet_stub);
 __weak_alias(ipsec6_input,rumpnet_stub);
 __weak_alias(ipsec6_check_policy,rumpnet_stub);
 __weak_alias(ipsec6_process_packet,rumpnet_stub);
+__weak_alias(ipsec_mtu,rumpnet_stub);
 __weak_alias(ipsec_set_policy,rumpnet_stub);
 __weak_alias(ipsec_get_policy,rumpnet_stub);
 __weak_alias(ipsec_delete_pcbpolicy,rumpnet_stub);



Home | Main Index | Thread Index | Old Index