Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec Fix IPv4 security policy with port number does ...



details:   https://anonhg.NetBSD.org/src/rev/4d6a79f2837e
branches:  trunk
changeset: 372290:4d6a79f2837e
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed Nov 09 08:18:52 2022 +0000

description:
Fix IPv4 security policy with port number does not work for forwarding packets.

diffstat:

 sys/netipsec/ipsec.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 1fbc9ace7c87 -r 4d6a79f2837e sys/netipsec/ipsec.c
--- a/sys/netipsec/ipsec.c      Tue Nov 08 13:47:09 2022 +0000
+++ b/sys/netipsec/ipsec.c      Wed Nov 09 08:18:52 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.175 2022/11/04 09:00:58 ozaki-r Exp $ */
+/* $NetBSD: ipsec.c,v 1.176 2022/11/09 08:18:52 knakahara 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.175 2022/11/04 09:00:58 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.176 2022/11/09 08:18:52 knakahara Exp $");
 
 /*
  * IPsec controller part.
@@ -543,7 +543,7 @@
        sp = NULL;
 
        /* Make an index to look for a policy. */
-       *error = ipsec_setspidx(m, &spidx, dir, (flag & IP_FORWARDING) ? 0 : 1);
+       *error = ipsec_setspidx(m, &spidx, dir, 1);
        if (*error != 0) {
                IPSECLOG(LOG_DEBUG, "setpidx failed, dir %u flag %u\n", dir, flag);
                memset(&spidx, 0, sizeof(spidx));



Home | Main Index | Thread Index | Old Index