Source-Changes-HG archive

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

src: Don't pass IP_ALLOWBROADCAST in ipsec4_input. The flag land...



details:   https://anonhg.NetBSD.org/src/rev/6169ddaae60b
branches:  trunk
changeset: 318055:6169ddaae60b
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Apr 11 08:11:20 2018 +0000
description:
Don't pass IP_ALLOWBROADCAST in ipsec4_input. The flag lands in
ipsec_getpolicybyaddr, and only IP_FORWARDING is taken.

In fact it would be good to change the 'flags' argument of ipsec4_input
to be a boolean, same for ipsec_getpolicybyaddr. It would be less
misleading.

diffstat:

 sys/netinet/ip_input.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 18c30e2a00e5 -r 6169ddaae60b sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Wed Apr 11 07:55:19 2018 +0000
+++ b/sys/netinet/ip_input.c    Wed Apr 11 08:11:20 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.378 2018/04/11 07:55:19 maxv Exp $      */
+/*     $NetBSD: ip_input.c,v 1.379 2018/04/11 08:11:20 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.378 2018/04/11 07:55:19 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.379 2018/04/11 08:11:20 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -729,8 +729,7 @@
 #ifdef IPSEC
                /* Check the security policy (SP) for the packet */
                if (ipsec_used) {
-                       if (ipsec4_input(m, IP_FORWARDING |
-                           (ip_directedbcast ? IP_ALLOWBROADCAST : 0)) != 0) {
+                       if (ipsec4_input(m, IP_FORWARDING) != 0) {
                                goto out;
                        }
                }



Home | Main Index | Thread Index | Old Index