Module Name:    src
Committed By:   maxv
Date:           Sat Aug  1 06:50:43 UTC 2020

Modified Files:
        src/sys/external/bsd/ipf/netinet: ip_nat.c
        src/sys/net: if_bridge.c

Log Message:
Remove #ifdef BRIDGE_IPF, compile in the code by default. Sent to
tech-net@.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/ipf/netinet/ip_nat.c
cvs rdiff -u -r1.173 -r1.174 src/sys/net/if_bridge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/ipf/netinet/ip_nat.c
diff -u src/sys/external/bsd/ipf/netinet/ip_nat.c:1.22 src/sys/external/bsd/ipf/netinet/ip_nat.c:1.23
--- src/sys/external/bsd/ipf/netinet/ip_nat.c:1.22	Wed Jun 24 21:54:57 2020
+++ src/sys/external/bsd/ipf/netinet/ip_nat.c	Sat Aug  1 06:50:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_nat.c,v 1.22 2020/06/24 21:54:57 jdolecek Exp $	*/
+/*	$NetBSD: ip_nat.c,v 1.23 2020/08/01 06:50:42 maxv Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -112,7 +112,7 @@ extern struct ifnet vpnif;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.22 2020/06/24 21:54:57 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.23 2020/08/01 06:50:42 maxv Exp $");
 #else
 static const char sccsid[] = "@(#)ip_nat.c	1.11 6/5/96 (C) 1995 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_nat.c,v 1.1.1.2 2012/07/22 13:45:27 darrenr Exp";
@@ -5035,7 +5035,7 @@ ipf_nat_out(fr_info_t *fin, nat_t *nat, 
 		ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, msumd, 0);
 	}
 #if !defined(_KERNEL) || defined(MENTAT) || defined(__sgi) || \
-    defined(linux) || defined(BRIDGE_IPF)
+    defined(linux)
 	else {
 		/*
 		 * Strictly speaking, this isn't necessary on BSD
@@ -5147,7 +5147,7 @@ ipf_nat_out(fr_info_t *fin, nat_t *nat, 
 		uh->uh_ulen += fin->fin_plen;
 		uh->uh_ulen = htons(uh->uh_ulen);
 #if !defined(_KERNEL) || defined(MENTAT) || defined(__sgi) || \
-    defined(linux) || defined(BRIDGE_IPF)
+    defined(linux)
 		ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0);
 #endif
 

Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.173 src/sys/net/if_bridge.c:1.174
--- src/sys/net/if_bridge.c:1.173	Fri May  1 22:27:42 2020
+++ src/sys/net/if_bridge.c	Sat Aug  1 06:50:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.173 2020/05/01 22:27:42 jdolecek Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.174 2020/08/01 06:50:43 maxv Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,10 +80,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.173 2020/05/01 22:27:42 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.174 2020/08/01 06:50:43 maxv Exp $");
 
 #ifdef _KERNEL_OPT
-#include "opt_bridge_ipf.h"
 #include "opt_inet.h"
 #include "opt_net_mpsafe.h"
 #endif /* _KERNEL_OPT */
@@ -114,19 +113,16 @@ __KERNEL_RCSID(0, "$NetBSD: if_bridge.c,
 #include <net/if_bridgevar.h>
 #include <net/ether_sw_offload.h>
 
-#if defined(BRIDGE_IPF)
 /* Used for bridge_ip[6]_checkbasic */
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
 #include <netinet/ip_private.h>		/* XXX */
-
 #include <netinet/ip6.h>
 #include <netinet6/in6_var.h>
 #include <netinet6/ip6_var.h>
 #include <netinet6/ip6_private.h>	/* XXX */
-#endif /* BRIDGE_IPF */
 
 /*
  * Size of the route hash table.  Must be a power of two.
@@ -314,7 +310,6 @@ static int	bridge_ioctl_gma(struct bridg
 static int	bridge_ioctl_sma(struct bridge_softc *, void *);
 static int	bridge_ioctl_sifprio(struct bridge_softc *, void *);
 static int	bridge_ioctl_sifcost(struct bridge_softc *, void *);
-#if defined(BRIDGE_IPF)
 static int	bridge_ioctl_gfilt(struct bridge_softc *, void *);
 static int	bridge_ioctl_sfilt(struct bridge_softc *, void *);
 static int	bridge_ipf(void *, struct mbuf **, struct ifnet *, int);
@@ -322,7 +317,6 @@ static int	bridge_ip_checkbasic(struct m
 # ifdef INET6
 static int	bridge_ip6_checkbasic(struct mbuf **mp);
 # endif /* INET6 */
-#endif /* BRIDGE_IPF */
 
 struct bridge_control {
 	int	(*bc_func)(struct bridge_softc *, void *);
@@ -373,10 +367,10 @@ static const struct bridge_control bridg
 [BRDGSIFPRIO] = {bridge_ioctl_sifprio, sizeof(struct ifbreq), BC_F_COPYIN|BC_F_SUSER}, 
 
 [BRDGSIFCOST] = {bridge_ioctl_sifcost, sizeof(struct ifbreq), BC_F_COPYIN|BC_F_SUSER}, 
-#if defined(BRIDGE_IPF)
+
 [BRDGGFILT] = {bridge_ioctl_gfilt, sizeof(struct ifbrparam), BC_F_COPYOUT},
 [BRDGSFILT] = {bridge_ioctl_sfilt, sizeof(struct ifbrparam), BC_F_COPYIN|BC_F_SUSER},
-#endif /* BRIDGE_IPF */
+
 [BRDGGIFS] = {bridge_ioctl_gifs, sizeof(struct ifbifconf), BC_F_XLATEIN|BC_F_XLATEOUT},
 [BRDGRTS] = {bridge_ioctl_rts, sizeof(struct ifbaconf), BC_F_XLATEIN|BC_F_XLATEOUT},
 };
@@ -1313,7 +1307,6 @@ bridge_ioctl_sifprio(struct bridge_softc
 	return 0;
 }
 
-#if defined(BRIDGE_IPF)
 static int
 bridge_ioctl_gfilt(struct bridge_softc *sc, void *arg)
 {
@@ -1349,7 +1342,6 @@ bridge_ioctl_sfilt(struct bridge_softc *
 
 	return 0;
 }
-#endif /* BRIDGE_IPF */
 
 static int
 bridge_ioctl_sifcost(struct bridge_softc *sc, void *arg)
@@ -2636,7 +2628,6 @@ bridge_rtnode_destroy(struct bridge_rtno
 	pool_put(&bridge_rtnode_pool, brt);
 }
 
-#if defined(BRIDGE_IPF)
 extern pfil_head_t *inet_pfil_hook;                 /* XXX */
 extern pfil_head_t *inet6_pfil_hook;                /* XXX */
 
@@ -2917,4 +2908,3 @@ bridge_ip6_checkbasic(struct mbuf **mp)
 	return -1;
 }
 # endif /* INET6 */
-#endif /* BRIDGE_IPF */

Reply via email to