[Glibc-bsd-commits] r5364 - in trunk/freebsd-utils/debian: . local/include local/include/netinet patches
rmh at alioth.debian.org
rmh at alioth.debian.org
Mon Jan 20 22:44:17 UTC 2014
Author: rmh
Date: 2014-01-20 22:44:17 +0000 (Mon, 20 Jan 2014)
New Revision: 5364
Added:
trunk/freebsd-utils/debian/local/include/netinet/
trunk/freebsd-utils/debian/local/include/netinet/icmp6.h
Removed:
trunk/freebsd-utils/debian/patches/003_kbdcontrol.diff
trunk/freebsd-utils/debian/patches/008_mount_hpfs.diff
trunk/freebsd-utils/debian/patches/010_mount_ntfs.diff
trunk/freebsd-utils/debian/patches/039_geom.diff
trunk/freebsd-utils/debian/patches/ifconfig_nojail.diff
trunk/freebsd-utils/debian/patches/mount_n.diff
trunk/freebsd-utils/debian/patches/pf_regex_followup.diff
trunk/freebsd-utils/debian/patches/powerd_no_cpufreq.diff
Modified:
trunk/freebsd-utils/debian/changelog
trunk/freebsd-utils/debian/control
trunk/freebsd-utils/debian/freebsd-utils.install
trunk/freebsd-utils/debian/freebsd-utils.manpages
trunk/freebsd-utils/debian/patches/001_dmesg.diff
trunk/freebsd-utils/debian/patches/006_mdconfig.diff
trunk/freebsd-utils/debian/patches/007_mount.diff
trunk/freebsd-utils/debian/patches/013_pf.diff
trunk/freebsd-utils/debian/patches/014_route.diff
trunk/freebsd-utils/debian/patches/016_swapon.diff
trunk/freebsd-utils/debian/patches/017_sysctl.diff
trunk/freebsd-utils/debian/patches/021_netstat.diff
trunk/freebsd-utils/debian/patches/022_devd.diff
trunk/freebsd-utils/debian/patches/026_kdump.diff
trunk/freebsd-utils/debian/patches/035_nfs.diff
trunk/freebsd-utils/debian/patches/makefiles.diff
trunk/freebsd-utils/debian/patches/mount_cli_compat.diff
trunk/freebsd-utils/debian/patches/netstat_numeric_default.diff
trunk/freebsd-utils/debian/patches/pf_regex_c.diff
trunk/freebsd-utils/debian/patches/ppp_macros.diff
trunk/freebsd-utils/debian/patches/route_list.diff
trunk/freebsd-utils/debian/patches/savecore_signal.diff
trunk/freebsd-utils/debian/patches/series
trunk/freebsd-utils/debian/patches/stablerestart-fhs-compliance.diff
trunk/freebsd-utils/debian/pf.manpages
trunk/freebsd-utils/debian/rules
Log:
* New upstream release.
- Refresh all patches.
- Remove atacontrol(8).
Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/changelog 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,11 +1,16 @@
-freebsd-utils (9.2+ds2-1) UNRELEASED; urgency=low
+freebsd-utils (10.0-1) UNRELEASED; urgency=low
+ * New upstream release.
+ - Refresh all patches.
+ - Remove atacontrol(8).
+
+ [ Robert Millan ]
* Add /etc/sysctl.conf. It used to be provided by procps, but now it
isn't. Its content is kernel-specific anyway, so let's just use the
FreeBSD version.
* Correctly setup BSD version of MAKEFLAGS to support parallel builds.
- -- Robert Millan <rmh at debian.org> Fri, 27 Dec 2013 13:59:57 +0100
+ -- Robert Millan <rmh at debian.org> Sat, 18 Jan 2014 01:37:52 +0100
freebsd-utils (9.2+ds1-1) unstable; urgency=low
Modified: trunk/freebsd-utils/debian/control
===================================================================
--- trunk/freebsd-utils/debian/control 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/control 2014-01-20 22:44:17 UTC (rev 5364)
@@ -8,14 +8,14 @@
Build-Depends: debhelper (>= 7), po-debconf, sharutils,
flex | flex-old,
freebsd-buildutils (>= 9.0-8~),
- freebsd-glue (>= 0.2.5~),
- kfreebsd-kernel-headers (>= 9.2~5),
+ freebsd-glue (>= 0.2.17~),
+ kfreebsd-kernel-headers (>= 10.0~3),
libc0.1-dev (>= 2.13-26),
libbsd-dev (>= 0.3.0),
# zlib1g-dev: savecore
zlib1g-dev,
# libkvm-dev: dmesg
- libkvm-dev (>= 8.3~),
+ libkvm-dev (>= 10.0),
libmemstat-dev,
libnetgraph-dev,
# libipx-dev: ifconfig
@@ -29,7 +29,7 @@
# libsbuf-dev: ifconfig, mdconfig, geom
libsbuf-dev (>= 8.2-2),
# libcam-dev: camcontrol
- libcam-dev (>= 9.2~),
+ libcam-dev (>= 10.0),
# libedit-dev: pppctl
libedit-dev,
# libexpat1-dev: ifconfig, geom
Modified: trunk/freebsd-utils/debian/freebsd-utils.install
===================================================================
--- trunk/freebsd-utils/debian/freebsd-utils.install 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/freebsd-utils.install 2014-01-20 22:44:17 UTC (rev 5364)
@@ -13,19 +13,14 @@
sbin/dumpon /sbin
sbin/savecore /sbin
sbin/swapon /sbin
-sbin/atacontrol /sbin
sbin/camcontrol /sbin
sbin/ccdconfig /sbin
sbin/mdconfig /sbin
-sbin/mount_std /sbin
sbin/mount_cd9660 /sbin
-sbin/mount_ext2fs /sbin
-sbin/mount_hpfs /sbin
sbin/mount_msdosfs /sbin
sbin/mount_nfs /sbin
-sbin/mount_ntfs /sbin
+sbin/mount_oldnfs /sbin
sbin/mount_nullfs /sbin
-sbin/mount_reiserfs /sbin
sbin/mount_udf /sbin
sbin/mount_unionfs /sbin
sbin/devfs /sbin
Modified: trunk/freebsd-utils/debian/freebsd-utils.manpages
===================================================================
--- trunk/freebsd-utils/debian/freebsd-utils.manpages 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/freebsd-utils.manpages 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,5 +1,4 @@
src/bin/kenv/kenv.1
-src/sbin/atacontrol/atacontrol.8
src/sbin/camcontrol/camcontrol.8
src/sbin/ccdconfig/ccdconfig.8
src/sbin/devfs/devfs.8
@@ -7,15 +6,10 @@
src/sbin/dumpon/dumpon.8
src/sbin/mdconfig/mdconfig.8
src/sbin/mount_cd9660/mount_cd9660.8
-src/sbin/mount_ext2fs/mount_ext2fs.8
-src/sbin/mount_hpfs/mount_hpfs.8
src/sbin/mount/mount.8
src/sbin/mount_msdosfs/mount_msdosfs.8
src/sbin/mount_nfs/mount_nfs.8
-src/sbin/mount_ntfs/mount_ntfs.8
src/sbin/mount_nullfs/mount_nullfs.8
-src/sbin/mount_reiserfs/mount_reiserfs.8
-src/sbin/mount_std/mount_std.8
src/sbin/mount_udf/mount_udf.8
src/sbin/mount_unionfs/mount_unionfs.8
src/sbin/savecore/savecore.8
Added: trunk/freebsd-utils/debian/local/include/netinet/icmp6.h
===================================================================
--- trunk/freebsd-utils/debian/local/include/netinet/icmp6.h (rev 0)
+++ trunk/freebsd-utils/debian/local/include/netinet/icmp6.h 2014-01-20 22:44:17 UTC (rev 5364)
@@ -0,0 +1,561 @@
+/* Copyright (C) 1991-1997,2000,2006,2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _NETINET_ICMP6_H
+#define _NETINET_ICMP6_H 1
+
+#include <inttypes.h>
+#include <string.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#define ICMP6_FILTER 18
+
+#define ICMP6_FILTER_BLOCK 1
+#define ICMP6_FILTER_PASS 2
+#define ICMP6_FILTER_BLOCKOTHERS 3
+#define ICMP6_FILTER_PASSONLY 4
+
+#define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr)
+ - sizeof(struct icmp6_hdr) */
+
+struct icmp6_filter
+ {
+ uint32_t icmp6_filt[8];
+ } __attribute__ ((__packed__));
+
+struct icmp6_hdr
+ {
+ uint8_t icmp6_type; /* type field */
+ uint8_t icmp6_code; /* code field */
+ uint16_t icmp6_cksum; /* checksum field */
+ union
+ {
+ uint32_t icmp6_un_data32[1]; /* type-specific field */
+ uint16_t icmp6_un_data16[2]; /* type-specific field */
+ uint8_t icmp6_un_data8[4]; /* type-specific field */
+ } icmp6_dataun;
+ } __attribute__ ((__packed__));
+
+#define icmp6_data32 icmp6_dataun.icmp6_un_data32
+#define icmp6_data16 icmp6_dataun.icmp6_un_data16
+#define icmp6_data8 icmp6_dataun.icmp6_un_data8
+#define icmp6_pptr icmp6_data32[0] /* parameter prob */
+#define icmp6_mtu icmp6_data32[0] /* packet too big */
+#define icmp6_id icmp6_data16[0] /* echo request/reply */
+#define icmp6_seq icmp6_data16[1] /* echo request/reply */
+#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */
+
+#define ICMP6_DST_UNREACH 1
+#define ICMP6_PACKET_TOO_BIG 2
+#define ICMP6_TIME_EXCEEDED 3
+#define ICMP6_PARAM_PROB 4
+
+#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */
+
+#define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */
+#define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */
+#define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */
+
+#define ICMP6_NI_SUCCESS 0 /* node information successful reply */
+#define ICMP6_NI_REFUSED 1 /* node information request is refused */
+#define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */
+
+#define ICMP6_ECHO_REQUEST 128
+#define ICMP6_ECHO_REPLY 129
+#define MLD_LISTENER_QUERY 130
+#define MLD_LISTENER_REPORT 131
+#define MLD_LISTENER_DONE 132
+#define MLD_LISTENER_REDUCTION MLD_LISTENER_DONE
+
+/* RFC2292 decls */
+#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
+#define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */
+#define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */
+/* the followings are for backward compatibility to old KAME apps. */
+#define MLD6_LISTENER_QUERY MLD_LISTENER_QUERY
+#define MLD6_LISTENER_REPORT MLD_LISTENER_REPORT
+#define MLD6_LISTENER_DONE MLD_LISTENER_DONE
+
+
+#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
+#define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */
+ /* administratively prohibited */
+#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
+#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */
+#define ICMP6_DST_UNREACH_NOPORT 4 /* bad port */
+
+#define ICMP6_TIME_EXCEED_TRANSIT 0 /* Hop Limit == 0 in transit */
+#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* Reassembly time out */
+
+#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */
+#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized Next Header */
+#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */
+
+#define ICMP6_FILTER_WILLPASS(type, filterp) \
+ ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)
+
+#define ICMP6_FILTER_WILLBLOCK(type, filterp) \
+ ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)
+
+#define ICMP6_FILTER_SETPASS(type, filterp) \
+ ((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31))))
+
+#define ICMP6_FILTER_SETBLOCK(type, filterp) \
+ ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))))
+
+#define ICMP6_FILTER_SETPASSALL(filterp) \
+ memset (filterp, 0xFF, sizeof (struct icmp6_filter));
+
+#define ICMP6_FILTER_SETBLOCKALL(filterp) \
+ memset (filterp, 0, sizeof (struct icmp6_filter));
+
+#define ND_ROUTER_SOLICIT 133
+#define ND_ROUTER_ADVERT 134
+#define ND_NEIGHBOR_SOLICIT 135
+#define ND_NEIGHBOR_ADVERT 136
+#define ND_REDIRECT 137
+
+struct nd_router_solicit /* router solicitation */
+ {
+ struct icmp6_hdr nd_rs_hdr;
+ /* could be followed by options */
+ } __attribute__ ((__packed__));
+
+#define nd_rs_type nd_rs_hdr.icmp6_type
+#define nd_rs_code nd_rs_hdr.icmp6_code
+#define nd_rs_cksum nd_rs_hdr.icmp6_cksum
+#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
+
+struct nd_router_advert /* router advertisement */
+ {
+ struct icmp6_hdr nd_ra_hdr;
+ uint32_t nd_ra_reachable; /* reachable time */
+ uint32_t nd_ra_retransmit; /* retransmit timer */
+ /* could be followed by options */
+ } __attribute__ ((__packed__));
+
+#define nd_ra_type nd_ra_hdr.icmp6_type
+#define nd_ra_code nd_ra_hdr.icmp6_code
+#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
+#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
+#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
+#define ND_RA_FLAG_MANAGED 0x80
+#define ND_RA_FLAG_OTHER 0x40
+#define ND_RA_FLAG_HOME_AGENT 0x20
+#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
+
+struct nd_neighbor_solicit /* neighbor solicitation */
+ {
+ struct icmp6_hdr nd_ns_hdr;
+ struct in6_addr nd_ns_target; /* target address */
+ /* could be followed by options */
+ } __attribute__ ((__packed__));
+
+#define nd_ns_type nd_ns_hdr.icmp6_type
+#define nd_ns_code nd_ns_hdr.icmp6_code
+#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
+#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
+
+struct nd_neighbor_advert /* neighbor advertisement */
+ {
+ struct icmp6_hdr nd_na_hdr;
+ struct in6_addr nd_na_target; /* target address */
+ /* could be followed by options */
+ } __attribute__ ((__packed__));
+
+#define nd_na_type nd_na_hdr.icmp6_type
+#define nd_na_code nd_na_hdr.icmp6_code
+#define nd_na_cksum nd_na_hdr.icmp6_cksum
+#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
+#if BYTE_ORDER == BIG_ENDIAN
+#define ND_NA_FLAG_ROUTER 0x80000000
+#define ND_NA_FLAG_SOLICITED 0x40000000
+#define ND_NA_FLAG_OVERRIDE 0x20000000
+#else /* BYTE_ORDER == LITTLE_ENDIAN */
+#define ND_NA_FLAG_ROUTER 0x00000080
+#define ND_NA_FLAG_SOLICITED 0x00000040
+#define ND_NA_FLAG_OVERRIDE 0x00000020
+#endif
+
+struct nd_redirect /* redirect */
+ {
+ struct icmp6_hdr nd_rd_hdr;
+ struct in6_addr nd_rd_target; /* target address */
+ struct in6_addr nd_rd_dst; /* destination address */
+ /* could be followed by options */
+ } __attribute__ ((__packed__));;
+
+#define nd_rd_type nd_rd_hdr.icmp6_type
+#define nd_rd_code nd_rd_hdr.icmp6_code
+#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
+#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
+
+struct nd_opt_hdr /* Neighbor discovery option header */
+ {
+ uint8_t nd_opt_type;
+ uint8_t nd_opt_len; /* in units of 8 octets */
+ /* followed by option specific data */
+ } __attribute__ ((__packed__));
+
+#define ND_OPT_SOURCE_LINKADDR 1
+#define ND_OPT_TARGET_LINKADDR 2
+#define ND_OPT_PREFIX_INFORMATION 3
+#define ND_OPT_REDIRECTED_HEADER 4
+#define ND_OPT_MTU 5
+#define ND_OPT_RTR_ADV_INTERVAL 7
+#define ND_OPT_HOME_AGENT_INFO 8
+
+struct nd_opt_prefix_info /* prefix information */
+ {
+ uint8_t nd_opt_pi_type;
+ uint8_t nd_opt_pi_len;
+ uint8_t nd_opt_pi_prefix_len;
+ uint8_t nd_opt_pi_flags_reserved;
+ uint32_t nd_opt_pi_valid_time;
+ uint32_t nd_opt_pi_preferred_time;
+ uint32_t nd_opt_pi_reserved2;
+ struct in6_addr nd_opt_pi_prefix;
+ } __attribute__ ((__packed__));
+
+#define ND_OPT_PI_FLAG_ONLINK 0x80
+#define ND_OPT_PI_FLAG_AUTO 0x40
+#define ND_OPT_PI_FLAG_RADDR 0x20
+
+struct nd_opt_rd_hdr /* redirected header */
+ {
+ uint8_t nd_opt_rh_type;
+ uint8_t nd_opt_rh_len;
+ uint16_t nd_opt_rh_reserved1;
+ uint32_t nd_opt_rh_reserved2;
+ /* followed by IP header and data */
+ } __attribute__ ((__packed__));
+
+struct nd_opt_mtu /* MTU option */
+ {
+ uint8_t nd_opt_mtu_type;
+ uint8_t nd_opt_mtu_len;
+ uint16_t nd_opt_mtu_reserved;
+ uint32_t nd_opt_mtu_mtu;
+ } __attribute__ ((__packed__));
+
+struct mld_hdr
+ {
+ struct icmp6_hdr mld_icmp6_hdr;
+ struct in6_addr mld_addr; /* multicast address */
+ } __attribute__ ((__packed__));
+
+#define mld_type mld_icmp6_hdr.icmp6_type
+#define mld_code mld_icmp6_hdr.icmp6_code
+#define mld_cksum mld_icmp6_hdr.icmp6_cksum
+#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0]
+#define mld_reserved mld_icmp6_hdr.icmp6_data16[1]
+
+/* definitions to provide backward compatibility to old KAME applications */
+#define mld6_hdr mld_hdr
+#define mld6_type mld_type
+#define mld6_code mld_code
+#define mld6_cksum mld_cksum
+#define mld6_maxdelay mld_maxdelay
+#define mld6_reserved mld_reserved
+#define mld6_addr mld_addr
+
+#define ICMP6_ROUTER_RENUMBERING 138
+
+#define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */
+#define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */
+#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */
+
+struct icmp6_router_renum /* router renumbering header */
+ {
+ struct icmp6_hdr rr_hdr;
+ uint8_t rr_segnum;
+ uint8_t rr_flags;
+ uint16_t rr_maxdelay;
+ uint32_t rr_reserved;
+ } __attribute__ ((__packed__));
+
+#define rr_type rr_hdr.icmp6_type
+#define rr_code rr_hdr.icmp6_code
+#define rr_cksum rr_hdr.icmp6_cksum
+#define rr_seqnum rr_hdr.icmp6_data32[0]
+
+/* Router renumbering flags */
+#define ICMP6_RR_FLAGS_TEST 0x80
+#define ICMP6_RR_FLAGS_REQRESULT 0x40
+#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20
+#define ICMP6_RR_FLAGS_SPECSITE 0x10
+#define ICMP6_RR_FLAGS_PREVDONE 0x08
+
+#define ICMP6_WRUREQUEST 139 /* who are you request */
+#define ICMP6_WRUREPLY 140 /* who are you reply */
+#define ICMP6_FQDN_QUERY 139 /* FQDN query */
+#define ICMP6_FQDN_REPLY 140 /* FQDN reply */
+#define ICMP6_NI_QUERY 139 /* node information request */
+#define ICMP6_NI_REPLY 140 /* node information reply */
+#define MLDV2_LISTENER_REPORT 143 /* RFC3810 listener report */
+
+/* The definitions below are experimental. TBA */
+#define MLD_MTRACE_RESP 200 /* mtrace resp (to sender) */
+#define MLD_MTRACE 201 /* mtrace messages */
+
+#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
+#define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */
+#define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */
+#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
+#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */
+#define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */
+
+#define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */
+#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */
+
+#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */
+#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */
+#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */
+
+#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */
+
+#define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */
+#define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */
+#define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */
+
+#define ICMP6_NI_SUCCESS 0 /* node information successful reply */
+#define ICMP6_NI_REFUSED 1 /* node information request is refused */
+#define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */
+
+#define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */
+#define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */
+#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */
+
+#define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */
+#define ND_REDIRECT_ROUTER 1 /* redirect to a better router */
+
+struct rr_pco_match /* match prefix part */
+ {
+ uint8_t rpm_code;
+ uint8_t rpm_len;
+ uint8_t rpm_ordinal;
+ uint8_t rpm_matchlen;
+ uint8_t rpm_minlen;
+ uint8_t rpm_maxlen;
+ uint16_t rpm_reserved;
+ struct in6_addr rpm_prefix;
+ } __attribute__ ((__packed__));
+
+/* PCO code values */
+#define RPM_PCO_ADD 1
+#define RPM_PCO_CHANGE 2
+#define RPM_PCO_SETGLOBAL 3
+#define RPM_PCO_MAX 4
+
+struct rr_pco_use /* use prefix part */
+ {
+ uint8_t rpu_uselen;
+ uint8_t rpu_keeplen;
+ uint8_t rpu_ramask;
+ uint8_t rpu_raflags;
+ uint32_t rpu_vltime;
+ uint32_t rpu_pltime;
+ uint32_t rpu_flags;
+ struct in6_addr rpu_prefix;
+ } __attribute__ ((__packed__));
+
+#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80
+#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40
+
+#if BYTE_ORDER == BIG_ENDIAN
+# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000
+# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000
+#elif BYTE_ORDER == LITTLE_ENDIAN
+# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
+# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
+#endif
+
+struct rr_result /* router renumbering result message */
+ {
+ uint16_t rrr_flags;
+ uint8_t rrr_ordinal;
+ uint8_t rrr_matchedlen;
+ uint32_t rrr_ifid;
+ struct in6_addr rrr_prefix;
+ } __attribute__ ((__packed__));
+
+#if BYTE_ORDER == BIG_ENDIAN
+# define ICMP6_RR_RESULT_FLAGS_OOB 0x0002
+# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
+#elif BYTE_ORDER == LITTLE_ENDIAN
+# define ICMP6_RR_RESULT_FLAGS_OOB 0x0200
+# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
+#endif
+
+/* Mobile IPv6 extension: Advertisement Interval. */
+struct nd_opt_adv_interval
+ {
+ uint8_t nd_opt_adv_interval_type;
+ uint8_t nd_opt_adv_interval_len;
+ uint16_t nd_opt_adv_interval_reserved;
+ uint32_t nd_opt_adv_interval_ival;
+ };
+
+/* Mobile IPv6 extension: Home Agent Info. */
+struct nd_opt_home_agent_info
+ {
+ uint8_t nd_opt_home_agent_info_type;
+ uint8_t nd_opt_home_agent_info_len;
+ uint16_t nd_opt_home_agent_info_reserved;
+ uint16_t nd_opt_home_agent_info_preference;
+ uint16_t nd_opt_home_agent_info_lifetime;
+ };
+
+/*-
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
+ */
+
+/*
+ * IP6 route structure
+ */
+
+struct route_in6 {
+ struct rtentry *ro_rt;
+ struct llentry *ro_lle;
+ struct sockaddr_in6 ro_dst;
+};
+
+/*
+ * Variables related to this implementation
+ * of the internet control message protocol version 6.
+ */
+struct icmp6errstat {
+ u_quad_t icp6errs_dst_unreach_noroute;
+ u_quad_t icp6errs_dst_unreach_admin;
+ u_quad_t icp6errs_dst_unreach_beyondscope;
+ u_quad_t icp6errs_dst_unreach_addr;
+ u_quad_t icp6errs_dst_unreach_noport;
+ u_quad_t icp6errs_packet_too_big;
+ u_quad_t icp6errs_time_exceed_transit;
+ u_quad_t icp6errs_time_exceed_reassembly;
+ u_quad_t icp6errs_paramprob_header;
+ u_quad_t icp6errs_paramprob_nextheader;
+ u_quad_t icp6errs_paramprob_option;
+ u_quad_t icp6errs_redirect; /* we regard redirect as an error here */
+ u_quad_t icp6errs_unknown;
+};
+
+struct icmp6stat {
+/* statistics related to icmp6 packets generated */
+ u_quad_t icp6s_error; /* # of calls to icmp6_error */
+ u_quad_t icp6s_canterror; /* no error 'cuz old was icmp */
+ u_quad_t icp6s_toofreq; /* no error 'cuz rate limitation */
+ u_quad_t icp6s_outhist[256];
+/* statistics related to input message processed */
+ u_quad_t icp6s_badcode; /* icmp6_code out of range */
+ u_quad_t icp6s_tooshort; /* packet < sizeof(struct icmp6_hdr) */
+ u_quad_t icp6s_checksum; /* bad checksum */
+ u_quad_t icp6s_badlen; /* calculated bound mismatch */
+ /*
+ * number of responses: this member is inherited from netinet code, but
+ * for netinet6 code, it is already available in icp6s_outhist[].
+ */
+ u_quad_t icp6s_reflect;
+ u_quad_t icp6s_inhist[256];
+ u_quad_t icp6s_nd_toomanyopt; /* too many ND options */
+ struct icmp6errstat icp6s_outerrhist;
+#define icp6s_odst_unreach_noroute \
+ icp6s_outerrhist.icp6errs_dst_unreach_noroute
+#define icp6s_odst_unreach_admin icp6s_outerrhist.icp6errs_dst_unreach_admin
+#define icp6s_odst_unreach_beyondscope \
+ icp6s_outerrhist.icp6errs_dst_unreach_beyondscope
+#define icp6s_odst_unreach_addr icp6s_outerrhist.icp6errs_dst_unreach_addr
+#define icp6s_odst_unreach_noport icp6s_outerrhist.icp6errs_dst_unreach_noport
+#define icp6s_opacket_too_big icp6s_outerrhist.icp6errs_packet_too_big
+#define icp6s_otime_exceed_transit \
+ icp6s_outerrhist.icp6errs_time_exceed_transit
+#define icp6s_otime_exceed_reassembly \
+ icp6s_outerrhist.icp6errs_time_exceed_reassembly
+#define icp6s_oparamprob_header icp6s_outerrhist.icp6errs_paramprob_header
+#define icp6s_oparamprob_nextheader \
+ icp6s_outerrhist.icp6errs_paramprob_nextheader
+#define icp6s_oparamprob_option icp6s_outerrhist.icp6errs_paramprob_option
+#define icp6s_oredirect icp6s_outerrhist.icp6errs_redirect
+#define icp6s_ounknown icp6s_outerrhist.icp6errs_unknown
+ u_quad_t icp6s_pmtuchg; /* path MTU changes */
+ u_quad_t icp6s_nd_badopt; /* bad ND options */
+ u_quad_t icp6s_badns; /* bad neighbor solicitation */
+ u_quad_t icp6s_badna; /* bad neighbor advertisement */
+ u_quad_t icp6s_badrs; /* bad router advertisement */
+ u_quad_t icp6s_badra; /* bad router advertisement */
+ u_quad_t icp6s_badredirect; /* bad redirect message */
+};
+
+#endif /* netinet/icmpv6.h */
Modified: trunk/freebsd-utils/debian/patches/001_dmesg.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/001_dmesg.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/001_dmesg.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,29 +1,15 @@
----
- sbin/dmesg/Makefile | 2 +-
- sbin/dmesg/dmesg.c | 7 +++++--
- 2 files changed, 6 insertions(+), 3 deletions(-)
-
--- a/src/sbin/dmesg/dmesg.c
+++ b/src/sbin/dmesg/dmesg.c
-@@ -68,7 +68,7 @@
- { NULL, 0, 0, 0, 0 },
- };
-
--void usage(void) __dead2;
-+void usage(void);
-
- #define KREAD(addr, var) \
- kvm_read(kd, addr, &var, sizeof(var)) != sizeof(var)
-@@ -86,7 +86,7 @@
- all = 0;
+@@ -87,7 +87,7 @@
+ clear = false;
(void) setlocale(LC_CTYPE, "");
memf = nlistf = NULL;
-- while ((ch = getopt(argc, argv, "aM:N:")) != -1)
-+ while ((ch = getopt(argc, argv, "aM:N:s:n:")) != -1)
+- while ((ch = getopt(argc, argv, "acM:N:")) != -1)
++ while ((ch = getopt(argc, argv, "acM:N:s:n:")) != -1)
switch(ch) {
case 'a':
- all++;
-@@ -97,6 +97,9 @@
+ all = true;
+@@ -101,6 +101,9 @@
case 'N':
nlistf = optarg;
break;
@@ -35,12 +21,10 @@
usage();
--- a/src/sbin/dmesg/Makefile
+++ b/src/sbin/dmesg/Makefile
-@@ -4,7 +4,7 @@
- PROG= dmesg
- MAN= dmesg.8
-
--LDADD= -lkvm
-+LDADD= -lkvm -lbsd
+@@ -7,4 +7,6 @@
+ LDADD= -lkvm
DPADD= ${LIBKVM}
++LDADD+= -lbsd
++
.include <bsd.prog.mk>
Deleted: trunk/freebsd-utils/debian/patches/003_kbdcontrol.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/003_kbdcontrol.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/003_kbdcontrol.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,15 +0,0 @@
----
- usr.sbin/kbdcontrol/kbdcontrol.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/src/usr.sbin/kbdcontrol/kbdcontrol.c
-+++ b/src/usr.sbin/kbdcontrol/kbdcontrol.c
-@@ -138,7 +138,7 @@
- void set_keyboard(char *device);
- void set_keyrates(char *opt);
- void show_kbd_info(void);
--void usage(void) __dead2;
-+void usage(void);
-
- char *
- nextarg(int ac, char **av, int *indp, int oc)
Modified: trunk/freebsd-utils/debian/patches/006_mdconfig.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/006_mdconfig.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/006_mdconfig.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -34,7 +34,7 @@
usage(void)
{
-@@ -315,8 +333,7 @@
+@@ -333,8 +351,7 @@
mdio.md_version = MDIOVERSION;
Modified: trunk/freebsd-utils/debian/patches/007_mount.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/007_mount.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/007_mount.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,6 +1,6 @@
--- a/src/sbin/mount/mount.c
+++ b/src/sbin/mount/mount.c
-@@ -662,11 +662,13 @@
+@@ -672,11 +672,13 @@
(void)printf(", reads: sync %ju async %ju",
(uintmax_t)sfp->f_syncreads,
(uintmax_t)sfp->f_asyncreads);
Deleted: trunk/freebsd-utils/debian/patches/008_mount_hpfs.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/008_mount_hpfs.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/008_mount_hpfs.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,15 +0,0 @@
----
- sbin/mount_hpfs/mount_hpfs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/src/sbin/mount_hpfs/mount_hpfs.c
-+++ b/src/sbin/mount_hpfs/mount_hpfs.c
-@@ -56,7 +56,7 @@
- static gid_t a_gid(char *);
- static uid_t a_uid(char *);
- static mode_t a_mask(char *);
--static void usage(void) __dead2;
-+static void usage(void);
- static void load_u2wtable(struct hpfs_args *, char *);
-
- int
Deleted: trunk/freebsd-utils/debian/patches/010_mount_ntfs.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/010_mount_ntfs.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/010_mount_ntfs.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,31 +0,0 @@
----
- sbin/mount_ntfs/mount_ntfs.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/src/sbin/mount_ntfs/mount_ntfs.c
-+++ b/src/sbin/mount_ntfs/mount_ntfs.c
-@@ -38,6 +38,7 @@
- #include <sys/mount.h>
- #include <sys/stat.h>
- #include <sys/module.h>
-+#include <iconv.h>
- #include <sys/iconv.h>
- #include <sys/linker.h>
- #include <fs/ntfs/ntfsmount.h>
-@@ -50,7 +51,6 @@
- #include <string.h>
- #include <sysexits.h>
- #include <unistd.h>
--#include <libutil.h>
-
- #include "mntopts.h"
-
-@@ -64,7 +64,7 @@
- static gid_t a_gid(char *);
- static uid_t a_uid(char *);
- static mode_t a_mask(char *);
--static void usage(void) __dead2;
-+static void usage(void);
-
- static int set_charset(struct ntfs_args *);
-
Modified: trunk/freebsd-utils/debian/patches/013_pf.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/013_pf.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/013_pf.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,59 +1,19 @@
--- a/src/contrib/pf/authpf/authpf.c
+++ b/src/contrib/pf/authpf/authpf.c
-@@ -37,7 +37,7 @@
- #if 1
- #include <inttypes.h>
- #endif
--#include <login_cap.h>
-+//#include <login_cap.h>
- #include <pwd.h>
- #include <grp.h>
- #include <signal.h>
-@@ -99,7 +99,6 @@
- gid_t gid;
- uid_t uid;
- const char *shell;
-- login_cap_t *lc;
-
- if (strcmp(__progname, "-authpf-noip") == 0)
- user_ip = 0;
-@@ -150,35 +149,19 @@
+@@ -149,10 +149,12 @@
goto die;
}
-- if ((lc = login_getclass(pw->pw_class)) != NULL)
-- shell = login_getcapstr(lc, "shell", pw->pw_shell,
-- pw->pw_shell);
-- else
++#if 0 /* we don't have pw_class */
+ if ((lc = login_getclass(pw->pw_class)) != NULL)
+ shell = login_getcapstr(lc, "shell", pw->pw_shell,
+ pw->pw_shell);
+ else
++#endif
shell = pw->pw_shell;
--#ifndef __FreeBSD__
-- login_close(lc);
--#endif
--
- if (strcmp(shell, PATH_AUTHPF_SHELL) &&
- strcmp(shell, PATH_AUTHPF_SHELL_NOIP)) {
- syslog(LOG_ERR, "wrong shell for user %s, uid %u",
- pw->pw_name, pw->pw_uid);
--#ifdef __FreeBSD__
-- login_close(lc);
--#else
- if (shell != pw->pw_shell)
- free(shell);
--#endif
- goto die;
- }
-
--#ifdef __FreeBSD__
-- login_close(lc);
--#else
- if (shell != pw->pw_shell)
- free(shell);
--#endif
-
- /*
- * Paranoia, but this data _does_ come from outside authpf, and
-@@ -521,9 +504,6 @@
+ #if 0
+@@ -520,9 +522,6 @@
}
if (buf[0] == '@') {
@@ -65,7 +25,7 @@
int cnt;
--- a/src/contrib/pf/ftp-proxy/ftp-proxy.c
+++ b/src/contrib/pf/ftp-proxy/ftp-proxy.c
-@@ -104,7 +104,7 @@
+@@ -103,7 +103,7 @@
int drop_privs(void);
void end_session(struct session *);
void exit_daemon(void);
@@ -74,7 +34,7 @@
void handle_connection(const int, short, void *);
void handle_signal(int, short, void *);
struct session * init_session(void);
-@@ -250,7 +250,7 @@
+@@ -249,7 +249,7 @@
buf_avail);
s->cbuf_valid += clientread;
@@ -83,7 +43,7 @@
logmsg(LOG_DEBUG, "#%d client: %s", s->id, linebuf);
if (!client_parse(s)) {
end_session(s);
-@@ -344,7 +344,7 @@
+@@ -343,7 +343,7 @@
}
int
@@ -92,7 +52,7 @@
{
size_t i;
-@@ -1088,7 +1088,7 @@
+@@ -1087,7 +1087,7 @@
buf_avail);
s->sbuf_valid += srvread;
@@ -101,59 +61,22 @@
logmsg(LOG_DEBUG, "#%d server: %s", s->id, linebuf);
if (!server_parse(s)) {
end_session(s);
---- a/src/contrib/pf/pfctl/parse.y
-+++ b/src/contrib/pf/pfctl/parse.y
-@@ -427,6 +427,7 @@
- } v;
- int lineno;
- } YYSTYPE;
-+#define YYSTYPE_IS_DECLARED 1
+--- a/src/sbin/pfctl/pfctl_parser.h
++++ b/src/sbin/pfctl/pfctl_parser.h
+@@ -159,6 +159,8 @@
+ } data;
+ };
- #define PPORT_RANGE 1
- #define PPORT_STAR 2
---- a/src/contrib/pf/pfctl/pfctl.h
-+++ b/src/contrib/pf/pfctl/pfctl.h
-@@ -36,6 +36,12 @@
-
- enum pfctl_show { PFCTL_SHOW_RULES, PFCTL_SHOW_LABELS, PFCTL_SHOW_NOTHING };
-
-+#include <string.h>
-+#include <stdlib.h>
-+#define __BSD_VISIBLE 1
-+#define __XSI_VISIBLE 1
-+#include <sys/limits.h>
++#define SIMPLEQ_END(head) NULL
+
- enum { PFRB_TABLES = 1, PFRB_TSTATS, PFRB_ADDRS, PFRB_ASTATS,
- PFRB_IFACES, PFRB_TRANS, PFRB_MAX };
- struct pfr_buffer {
---- a/src/contrib/pf/pfctl/pfctl_parser.c
-+++ b/src/contrib/pf/pfctl/pfctl_parser.c
-@@ -59,6 +59,28 @@
- #include <ifaddrs.h>
- #include <unistd.h>
-
-+
-+
-+/* RFC2292 decls */
-+#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
-+#define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */
-+#define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */
-+#define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */
-+#define MLD_LISTENER_QUERY 130 /* multicast listener query */
-+#define MLD_LISTENER_REPORT 131 /* multicast listener report */
-+#define MLD_LISTENER_DONE 132 /* multicast listener done */
-+#define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
-+#define ICMP6_WRUREQUEST 139 /* who are you request */
-+#define ICMP6_WRUREPLY 140 /* who are you reply */
-+#define ICMP6_FQDN_QUERY 139 /* FQDN query */
-+#define ICMP6_FQDN_REPLY 140 /* FQDN reply */
-+#define ICMP6_NI_QUERY 139 /* node information request */
-+#define ICMP6_NI_REPLY 140 /* node information reply */
-+#define MLD_MTRACE_RESP 200 /* mtrace resp (to sender) */
-+#define MLD_MTRACE 201 /* mtrace messages */
-+#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
-+#define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */
-+#define ND_REDIRECT_ROUTER 1 /* redirect to a better router */
- #include "pfctl_parser.h"
- #include "pfctl.h"
-
+ #ifdef __FreeBSD__
+ /*
+ * XXX
+@@ -169,7 +171,6 @@
+ #define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
+ #define SIMPLEQ_ENTRY STAILQ_ENTRY
+ #define SIMPLEQ_FIRST STAILQ_FIRST
+-#define SIMPLEQ_END(head) NULL
+ #define SIMPLEQ_EMPTY STAILQ_EMPTY
+ #define SIMPLEQ_NEXT STAILQ_NEXT
+ /*#define SIMPLEQ_FOREACH STAILQ_FOREACH*/
Modified: trunk/freebsd-utils/debian/patches/014_route.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/014_route.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/014_route.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,6 +1,6 @@
--- a/src/sbin/route/route.c
+++ b/src/sbin/route/route.c
-@@ -174,7 +174,7 @@
+@@ -163,7 +163,7 @@
if (argc < 2)
usage(NULL);
@@ -9,7 +9,7 @@
switch(ch) {
case 'n':
nflag = 1;
-@@ -250,6 +250,11 @@
+@@ -239,6 +239,11 @@
if (fib < 0)
return (0);
Modified: trunk/freebsd-utils/debian/patches/016_swapon.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/016_swapon.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/016_swapon.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,41 +1,24 @@
-
-Get rid of getbsize. Default in upstream is 512, but we might want to have
-something sane instead...
-
----
- sbin/swapon/Makefile | 2 +-
- sbin/swapon/swapon.c | 13 +++++++++++--
- 2 files changed, 12 insertions(+), 3 deletions(-)
-
--- a/src/sbin/swapon/swapon.c
+++ b/src/sbin/swapon/swapon.c
-@@ -41,6 +41,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/swap.h>
- #include <sys/stat.h>
- #include <sys/param.h>
- #include <sys/sysctl.h>
-@@ -72,6 +73,8 @@
- int sflag = 0, lflag = 0, hflag = 0, qflag = 0;
+@@ -87,6 +87,8 @@
+ int sflag, lflag, late, hflag;
const char *etc_fstab;
+ setprogname (argv[0]);
+
+ sflag = lflag = late = hflag = 0;
if ((ptr = strrchr(argv[0], '/')) == NULL)
ptr = argv[0];
- if (strstr(ptr, "swapon"))
-@@ -82,7 +85,7 @@
+@@ -98,7 +100,7 @@
doall = 0;
etc_fstab = NULL;
-- while ((ch = getopt(argc, argv, "AadghklmqsUF:")) != -1) {
-+ while ((ch = getopt(argc, argv, "AadghklmqsUF:ve")) != -1) {
+- while ((ch = getopt(argc, argv, "AadghklLmqsUF:")) != -1) {
++ while ((ch = getopt(argc, argv, "AadghklLmqsUF:ve")) != -1) {
switch(ch) {
case 'A':
if (which_prog == SWAPCTL) {
-@@ -137,6 +140,9 @@
+@@ -154,6 +156,9 @@
case 'F':
etc_fstab = optarg;
break;
@@ -45,13 +28,3 @@
case '?':
default:
usage();
-@@ -278,7 +284,8 @@
- hlen = 10;
- break;
- default:
-- getbsize(&hlen, &blocksize);
-+ blocksize = 1024 * 1024;
-+ hlen = 10;
- snprintf(buf, sizeof(buf), "%ld-blocks", blocksize);
- break;
- }
Modified: trunk/freebsd-utils/debian/patches/017_sysctl.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/017_sysctl.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/017_sysctl.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -4,15 +4,15 @@
--- a/src/sbin/sysctl/sysctl.c
+++ b/src/sbin/sysctl/sysctl.c
-@@ -57,6 +57,7 @@
- #include <stdlib.h>
+@@ -58,6 +58,7 @@
#include <string.h>
+ #include <sysexits.h>
#include <unistd.h>
+#include <time.h>
- static int aflag, bflag, dflag, eflag, hflag, iflag;
- static int Nflag, nflag, oflag, qflag, xflag, warncount;
-@@ -353,6 +354,7 @@
+ static const char *conffile;
+
+@@ -471,6 +472,7 @@
static int
S_loadavg(int l2, void *p)
{
@@ -20,7 +20,7 @@
struct loadavg *tv = (struct loadavg*)p;
if (l2 != sizeof(*tv)) {
-@@ -363,6 +365,7 @@
+@@ -481,6 +483,7 @@
(double)tv->ldavg[0]/(double)tv->fscale,
(double)tv->ldavg[1]/(double)tv->fscale,
(double)tv->ldavg[2]/(double)tv->fscale);
Modified: trunk/freebsd-utils/debian/patches/021_netstat.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/021_netstat.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/021_netstat.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,6 +1,6 @@
--- a/src/usr.bin/netstat/netgraph.c
+++ b/src/usr.bin/netstat/netgraph.c
-@@ -76,8 +76,8 @@
+@@ -75,8 +75,8 @@
const char *const modname = "ng_socket.ko";
/* XXX We should get "mpath" from "sysctl kern.module_path" */
const char *mpath[] = { "/", "/boot/", "/modules/", NULL };
Modified: trunk/freebsd-utils/debian/patches/022_devd.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/022_devd.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/022_devd.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,16 +1,3 @@
---- a/src/sbin/devd/parse.y
-+++ b/src/sbin/devd/parse.y
-@@ -29,9 +29,9 @@
- * $FreeBSD$
- */
-
--#include "devd.h"
- #include <stdio.h>
- #include <string.h>
-+#include "devd.h"
-
- %}
-
--- a/src/etc/devd.conf
+++ b/src/etc/devd.conf
@@ -1,8 +1,5 @@
@@ -30,7 +17,7 @@
pid-file "/var/run/devd.pid";
# Setup some shorthand for regex that we use later in the file.
-@@ -27,144 +23,6 @@
+@@ -27,112 +23,6 @@
# Note that the attach/detach with the highest value wins, so that one can
# override these general rules.
@@ -41,7 +28,7 @@
-# NB: DETACH events are ignored; the kernel should handle all cleanup
-# (routes, arp cache). Beware of races against immediate create
-# of a device with the same name; e.g.
--# ifconfig bridge0 destroy; ifconfig bridge0 create
+-# ifconfig bridge0 destroy; ifconfig bridge0 create
-#
-notify 0 {
- match "system" "IFNET";
@@ -140,42 +127,10 @@
- action "/etc/rc.d/moused stop $cdev";
-};
-
--# Firmware download into the ActiveWire board. After the firmware download is
--# done, the device detaches and reappears as something new and shiny
--# automatically.
--attach 100 {
-- match "vendor" "0x0854";
-- match "product" "0x0100";
-- match "release" "0x0000";
-- action "/usr/local/bin/ezdownload -f /usr/local/share/usb/firmware/0854.0100.0_01.hex $device-name";
--};
--
--# Firmware download for Entrega Serial DB25 adapter.
--attach 100 {
-- match "vendor" "0x1645";
-- match "product" "0x8001";
-- match "release" "0x0101";
-- action "if ! kldstat -n usio > /dev/null 2>&1 ; then kldload usio; fi; /usr/sbin/ezdownload -v -f /usr/share/usb/firmware/1645.8001.0101 /dev/$device-name";
--};
--
--# This entry starts the ColdSync tool in daemon mode. Make sure you have an up
--# to date /usr/local/etc/palms. We override the 'listen' settings for port and
--# type in /usr/local/etc/coldsync.conf.
--notify 100 {
-- match "system" "USB";
-- match "subsystem" "DEVICE";
-- match "type" "ATTACH";
-- match "vendor" "0x082d";
-- match "product" "0x0100";
-- match "release" "0x0100";
-- action "/usr/local/bin/coldsync -md -p /dev/$cdev -t usb";
--};
--
--#
- # Rescan scsi device-names on attach, but not detach. However, it is
- # disabled by default due to reports of problems.
- #
-@@ -211,13 +69,6 @@
+ # Firmware download into the ActiveWire board. After the firmware download is
+ # done, the device detaches and reappears as something new and shiny
+ # automatically.
+@@ -211,13 +101,6 @@
vendor $vendor bus $bus";
};
@@ -189,7 +144,7 @@
# Notify all users before beginning emergency shutdown when we get
# a _CRT or _HOT thermal event and we're going to power down the system
# very soon.
-@@ -259,19 +110,6 @@
+@@ -259,19 +142,6 @@
action "logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'";
};
Modified: trunk/freebsd-utils/debian/patches/026_kdump.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/026_kdump.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/026_kdump.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,13 +1,6 @@
----
- usr.bin/kdump/Makefile | 5 +-
- usr.bin/kdump/kdump.c | 46 +++++++++++----------
- usr.bin/kdump/mksubr | 103 +++++++++++++++++++++++++++++++++----------------
- usr.bin/kdump/stat16.h | 55 ++++++++++++++++++++++++++
- 4 files changed, 154 insertions(+), 55 deletions(-)
-
--- a/src/usr.bin/kdump/kdump.c
+++ b/src/usr.bin/kdump/kdump.c
-@@ -55,6 +55,7 @@
+@@ -56,6 +56,7 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/stat.h>
@@ -15,7 +8,7 @@
#include <sys/sysent.h>
#include <sys/un.h>
#include <sys/queue.h>
-@@ -69,6 +70,8 @@
+@@ -71,6 +72,8 @@
#include <netinet/in.h>
#include <ctype.h>
#include <dlfcn.h>
@@ -24,25 +17,32 @@
#include <err.h>
#include <grp.h>
#include <inttypes.h>
-@@ -98,7 +101,7 @@
- void ktrcsw_old(struct ktr_csw_old *);
+@@ -106,7 +109,7 @@
void ktruser(int, unsigned char *);
+ void ktrcaprights(cap_rights_t *);
void ktrsockaddr(struct sockaddr *);
-void ktrstat(struct stat *);
+void ktrstat(struct stat16 *);
void ktrstruct(char *, size_t);
+ void ktrcapfail(struct ktr_cap_fail *);
void ktrfault(struct ktr_fault *);
- void ktrfaultend(struct ktr_faultend *);
-@@ -808,7 +811,7 @@
+@@ -1161,6 +1164,7 @@
ip++;
narg--;
- c = ',';
-- } else if (ktr->ktr_code == SYS___semctl) {
-+ } else if (ktr->ktr_code == SYS_semctl) {
- print_number(ip,narg,c);
- print_number(ip,narg,c);
- (void)putchar(',');
-@@ -1414,7 +1417,7 @@
+ break;
++#ifdef SYS_procctl
+ case SYS_procctl:
+ putchar('(');
+ idtypename(*ip, decimal);
+@@ -1173,6 +1177,7 @@
+ ip++;
+ narg--;
+ break;
++#endif
+ }
+ }
+ while (narg > 0) {
+@@ -1643,7 +1648,7 @@
}
void
@@ -53,80 +53,78 @@
struct passwd *pwd;
--- a/src/usr.bin/kdump/Makefile
+++ b/src/usr.bin/kdump/Makefile
-@@ -10,6 +10,7 @@
- PROG= kdump
- SRCS= kdump.c ioctl.c kdump_subr.c subr.c
- CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../..
-+LDADD+= -lbsd
+@@ -12,6 +12,9 @@
+ DPSRCS= kdump_subr.h
+ CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I.
++CFLAGS+= -Wno-error=implicit-function-declaration
++LDADD+= -lfreebsd-glue
++
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
SRCS+= linux_syscalls.c
-@@ -21,10 +22,10 @@
+ .endif
+@@ -22,14 +25,14 @@
ioctl.c: mkioctls
- env CPP="${CPP}" \
-- sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
-+ sh ${.CURDIR}/mkioctls /usr/include /usr/include/*-kfreebsd-gnu > ${.TARGET}
+ env MACHINE=${MACHINE} CPP="${CPP}" \
+- sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include > ${.TARGET}
++ sh ${.CURDIR}/mkioctls print /usr/src/kfreebsd-headers-10.0-1/sys > ${.TARGET}
- kdump_subr.c: mksubr
-- sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include > ${.TARGET}
-+ sh ${.CURDIR}/mksubr /usr/include /usr/include/*-kfreebsd-gnu > ${.TARGET}
+ kdump_subr.h: mksubr
+- sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \
++ sh ${.CURDIR}/mksubr /usr/src/kfreebsd-headers-10.0-1/sys | \
+ sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET}
+ kdump_subr.c: mksubr kdump_subr.h
+- sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET}
++ sh ${.CURDIR}/mksubr /usr/src/kfreebsd-headers-10.0-1/sys >${.TARGET}
+
linux_syscalls.c:
/bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \
--- a/src/usr.bin/kdump/mksubr
+++ b/src/usr.bin/kdump/mksubr
-@@ -50,7 +50,7 @@
- echo "usage: sh $0 include-dir"
- exit 1
- fi
--include_dir=$1
-+include_dirs="$*"
-
- #
- # Automatically generates a C function that will print out the
-@@ -74,13 +74,16 @@
- int or = 0;
- printf("%#x<", arg);
- _EOF_
-+ for include_dir in $include_dirs ; do if test -e $include_dir/$file ; then \
- egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \
-- $include_dir/$file | \
-+ $include_dir/$file ; fi ; done | \
- awk '{ for (i = 1; i <= NF; i++) \
+@@ -80,7 +80,10 @@
if ($i ~ /define/) \
break; \
++i; \
-- printf "\tif(!((arg>0)^((%s)>0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }'
-+ n = $i ; \
-+ sub("__", "", n); \
-+ printf "\tif(!((arg>0)^((%s)>0)))\n\t\tif_print_or(arg, %s, or);\n", $i, n }'
+- printf "\tif (!((arg > 0) ^ ((%s) > 0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }'
++ if ($i) { \
++ printf "#ifdef %s\n", $i; \
++ printf "\tif (!((arg > 0) ^ ((%s) > 0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i; \
++ printf "#endif\n" } }'
cat <<_EOF_
printf(">");
if (or == 0)
-@@ -107,8 +110,9 @@
- {
- switch (arg) {
- _EOF_
-+ for include_dir in $include_dirs ; do if test -e $include_dir/$file ; then \
- egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \
-- $include_dir/$file | \
-+ $include_dir/$file ; fi ; done | \
- awk '{ for (i = 1; i <= NF; i++) \
+@@ -113,7 +116,10 @@
if ($i ~ /define/) \
break; \
-@@ -139,8 +143,9 @@
- $name (int arg)
- {
+ ++i; \
+- printf "\tcase %s:\n\t\tprintf(\"%s\");\n\t\tbreak;\n", $i, $i }'
++ if ($i) { \
++ printf "#ifdef %s\n", $i; \
++ printf "\tcase %s:\n\t\tprintf(\"%s\");\n\t\tbreak;\n", $i, $i; \
++ printf "#endif\n" } }'
+ cat <<_EOF_
+ default: /* Should not reach */
+ printf("<invalid=%jd>", arg);
+@@ -141,10 +147,14 @@
_EOF_
-+ for include_dir in $include_dirs ; do if test -e $include_dir/$file ; then \
egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \
-- $include_dir/$file | \
-+ $include_dir/$file ; fi ; done | \
- awk '{ printf "\t"; \
+ $include_dir/$file | \
+- awk '{ printf "\t"; \
++ awk '{
++ if ($2) { \
++ printf "#ifdef %s\n", $2; \
++ printf "\t"; \
if (NR > 1) \
printf "else " ; \
-@@ -160,6 +165,7 @@
+- printf "if (arg == %s) \n\t\tprintf(\"%s\");\n", $2, $2 }'
++ printf "if (arg == %s) \n\t\tprintf(\"%s\");\n", $2, $2;
++ printf "#endif\n" } }'
+ cat <<_EOF_
+ else /* Should not reach */
+ printf("<invalid=%jd>", arg);
+@@ -161,6 +171,7 @@
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/unistd.h>
@@ -134,7 +132,7 @@
#include <sys/mman.h>
#include <sys/wait.h>
#define _KERNEL
-@@ -173,11 +179,7 @@
+@@ -175,11 +186,7 @@
#include <sys/reboot.h>
#include <sched.h>
#include <sys/linker.h>
@@ -146,7 +144,7 @@
#include <aio.h>
#include <sys/sem.h>
#include <sys/ipc.h>
-@@ -190,6 +192,20 @@
+@@ -193,6 +200,20 @@
#include "kdump_subr.h"
@@ -167,109 +165,127 @@
/*
* These are simple support macros. print_or utilizes a variable
* defined in the calling function to track whether or not it should
-@@ -353,47 +369,48 @@
+@@ -336,6 +357,7 @@
+ case P_PID:
+ printf("P_PID");
+ break;
++#if 0
+ case P_PPID:
+ printf("P_PPID");
+ break;
+@@ -381,6 +403,7 @@
+ case P_PSETID:
+ printf("P_PSETID");
+ break;
++#endif
+ default:
+ if (decimal) {
+ printf("%d", idtype);
+@@ -438,10 +461,14 @@
+ void
+ socktypenamewithflags(int type)
+ {
++#ifdef SOCK_CLOEXEC
+ if (type & SOCK_CLOEXEC)
+ printf("SOCK_CLOEXEC|"), type &= ~SOCK_CLOEXEC;
++#endif
++#ifdef SOCK_NONBLOCK
+ if (type & SOCK_NONBLOCK)
+ printf("SOCK_NONBLOCK|"), type &= ~SOCK_NONBLOCK;
++#endif
+ socktypename(type);
}
_EOF_
-
--auto_or_type "modename" "S_[A-Z]+[[:space:]]+[0-6]{7}" "sys/stat.h"
--auto_or_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h"
--auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h"
--auto_or_type "mmapprotname" "PROT_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h"
--auto_or_type "mmapflagsname" "MAP_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h"
--auto_or_type "wait4optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h"
- auto_or_type "getfsstatflagsname" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h"
- auto_or_type "mountflagsname" "MNT_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mount.h"
- auto_or_type "rebootoptname" "RB_[A-Z]+[[:space:]]+0x[0-9]+" "sys/reboot.h"
--auto_or_type "flockname" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "sys/fcntl.h"
- auto_or_type "thrcreateflagsname" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h"
--auto_or_type "mlockallname" "MCL_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h"
--auto_or_type "shmatname" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h"
--auto_or_type "rforkname" "RF[A-Z]+[[:space:]]+\([0-9]+<<[0-9]+\)" "sys/unistd.h"
- auto_or_type "nfssvcname" "NFSSVC_[A-Z0-9]+[[:space:]]+0x[0-9]+" "nfs/nfssvc.h"
-
--auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h"
- auto_switch_type "rlimitname" "RLIMIT_[A-Z]+[[:space:]]+[0-9]+" "sys/resource.h"
- auto_switch_type "shutdownhowname" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h"
--auto_switch_type "prioname" "PRIO_[A-Z]+[[:space:]]+[0-9]" "sys/resource.h"
--auto_switch_type "fadvisebehavname" "POSIX_FADV_[A-Z]+[[:space:]]+[0-9]+" "sys/fcntl.h"
--auto_switch_type "madvisebehavname" "_?MADV_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h"
--auto_switch_type "msyncflagsname" "MS_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h"
- auto_switch_type "schedpolicyname" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h"
- auto_switch_type "kldunloadfflagsname" "LINKER_UNLOAD_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h"
- auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h"
- auto_switch_type "kldsymcmdname" "KLDSYM_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h"
- auto_switch_type "sendfileflagsname" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h"
- auto_switch_type "acltypename" "ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+" "sys/acl.h"
--auto_switch_type "sigprocmaskhowname" "SIG_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h"
- auto_switch_type "lio_listioname" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "aio.h"
--auto_switch_type "minheritname" "INHERIT_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h"
- auto_switch_type "quotactlname" "Q_[A-Z]+[[:space:]]+0x[0-9]+" "ufs/ufs/quota.h"
--auto_if_type "sockdomainname" "PF_[[:alnum:]]+[[:space:]]+" "sys/socket.h"
--auto_if_type "sockfamilyname" "AF_[[:alnum:]]+[[:space:]]+" "sys/socket.h"
- auto_if_type "sockipprotoname" "IPPROTO_[[:alnum:]]+[[:space:]]+" "netinet/in.h"
--auto_switch_type "sockoptname" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h"
--auto_switch_type "socktypename" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h"
- auto_switch_type "ptraceopname" "PT_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/ptrace.h"
- auto_switch_type "vmresultname" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h"
-
-+auto_or_type "modename" "S_[A-Z]+[[:space:]]+[0-6]{7}" "bits/stat.h"
-+auto_or_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "bits/fcntl.h"
-+auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "fcntl.h"
-+auto_or_type "mmapprotname" "PROT_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "bits/mman.h"
-+auto_or_type "mmapflagsname" "MAP_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "bits/mman.h"
-+auto_or_type "wait4optname" "W[A-Z]+[[:space:]]+[0-9]+" "bits/waitflags.h"
-+auto_or_type "flockname" "LOCK_[A-Z]+[[:space:]]+0x[0-9]+" "bits/fcntl.h"
-+auto_or_type "mlockallname" "MCL_[A-Z]+[[:space:]]+0x[0-9]+" "bits/mman.h"
-+auto_or_type "shmatname" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "bits/shm.h"
-+auto_or_type "rforkname" "RF[A-Z]+[[:space:]]+\([0-9]+<<[0-9]+\)" "sys/rfork.h"
-+auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "stdio.h"
-+auto_switch_type "prioname" "PRIO_[A-Z]+[[:space:]]+[0-9]" "bits/resource.h"
-+auto_switch_type "fadvisebehavname" "POSIX_FADV_[A-Z]+[[:space:]]+[0-9]+" "bits/fcntl.h"
-+auto_switch_type "madvisebehavname" "_?MADV_[A-Z]+[[:space:]]+[0-9]+" "bits/mman.h"
-+auto_switch_type "msyncflagsname" "MS_[A-Z]+[[:space:]]+0x[0-9]+" "bits/mman.h"
-+auto_switch_type "sigprocmaskhowname" "SIG_[A-Z]+[[:space:]]+[0-9]+" "bits/sigaction.h"
-+auto_switch_type "minheritname" "INHERIT_[A-Z]+[[:space:]]+[0-9]+" "bits/mman.h"
-+auto_if_type "sockdomainname" "PF_[[:alnum:]]+[[:space:]]+" "bits/socket.h"
-+auto_if_type "sockfamilyname" "AF_[[:alnum:]]+[[:space:]]+" "bits/socket.h"
-+auto_switch_type "sockoptname" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "bits/socket.h"
-+auto_switch_type "socktypename" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "bits/socket.h"
-+
- cat <<_EOF_
- /*
- * AUTO - Special
-@@ -405,8 +422,9 @@
- {
- switch (cmd) {
- _EOF_
-+ for include_dir in $include_dirs ; do if test -e $include_dir/$file ; then \
- egrep "^#[[:space:]]*define[[:space:]]+F_[A-Z]+[[:space:]]+[0-9]+[[:space:]]*" \
-- $include_dir/sys/fcntl.h | \
-+ $include_dir/sys/fcntl.h ; fi ; done | \
- awk 'BEGIN { o=0 } { for (i = 1; i <= NF; i++) \
- if ($i ~ /define/) \
+@@ -456,7 +483,7 @@
+ auto_or_type "getfsstatflagsname" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h"
+ auto_switch_type "kldsymcmdname" "KLDSYM_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h"
+ auto_switch_type "kldunloadfflagsname" "LINKER_UNLOAD_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h"
+-auto_switch_type "lio_listioname" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "aio.h"
++auto_switch_type "lio_listioname" "LIO_(NO)?WAIT[[:space:]]+[0-9]+" "sys/aio.h"
+ auto_switch_type "madvisebehavname" "_?MADV_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h"
+ auto_switch_type "minheritname" "INHERIT_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h"
+ auto_or_type "mlockallname" "MCL_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h"
+@@ -472,7 +499,7 @@
+ auto_or_type "rebootoptname" "RB_[A-Z]+[[:space:]]+0x[0-9]+" "sys/reboot.h"
+ auto_or_type "rforkname" "RF[A-Z]+[[:space:]]+\([0-9]+<<[0-9]+\)" "sys/unistd.h"
+ auto_switch_type "rlimitname" "RLIMIT_[A-Z]+[[:space:]]+[0-9]+" "sys/resource.h"
+-auto_switch_type "schedpolicyname" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h"
++auto_switch_type "schedpolicyname" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sys/sched.h"
+ auto_switch_type "sendfileflagsname" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h"
+ auto_or_type "shmatname" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h"
+ auto_switch_type "shutdownhowname" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h"
+@@ -511,7 +538,11 @@
break; \
-@@ -454,8 +472,9 @@
+ ++i; \
+ if (o <= $(i+1)) \
++ {
++ if ($i) { \
++ printf "#ifdef %s\n", $i; \
+ printf "\tcase %s:\n\t\tprintf(\"%s\");\n\t\tbreak;\n", $i, $i; \
++ printf "#endif\n"; } } \
+ else \
+ exit; \
+ o = $(i+1) }'
+@@ -549,7 +580,6 @@
+ void
+ mmapflagsname(int flags)
{
- switch (func) {
+- int align;
+ int or = 0;
+ printf("%#x<", flags);
_EOF_
--egrep "^#[[:space:]]*define[[:space:]]+RTP_[A-Z]+[[:space:]]+0x[0-9]+[[:space:]]*" \
-- $include_dir/sys/rtprio.h | grep -v RTP_PRIO | \
-+ for include_dir in $include_dirs ; do if test -e $include_dir/$file ; then \
-+egrep "^#[[:space:]]*define[[:space:]]+RTP_[A-Z]+[[:space:]]+[0-9]+[[:space:]]*" \
-+ $include_dir/sys/rtprio.h ; fi ; done | grep -v RTP_PRIO | \
- awk '{ for (i = 1; i <= NF; i++) \
+@@ -559,13 +589,17 @@
if ($i ~ /define/) \
break; \
-@@ -486,7 +505,8 @@
+ ++i; \
+- printf "\tif (!((flags > 0) ^ ((%s) > 0)))\n\t\tif_print_or(flags, %s, or);\n", $i, $i }'
++ if ($i) { \
++ printf "#ifdef %s\n", $i; \
++ printf "\tif (!((flags > 0) ^ ((%s) > 0)))\n\t\tif_print_or(flags, %s, or);\n", $i, $i; \
++ printf "#endif\n" } }'
+ cat <<_EOF_
+ #ifdef MAP_32BIT
+ if (!((flags > 0) ^ ((MAP_32BIT) > 0)))
+ if_print_or(flags, MAP_32BIT, or);
+ #endif
+- align = flags & MAP_ALIGNMENT_MASK;
++#ifdef MAP_ALIGNMENT_MASK
++ int align = flags & MAP_ALIGNMENT_MASK;
+ if (align != 0) {
+ if (align == MAP_ALIGNED_SUPER)
+ print_or("MAP_ALIGNED_SUPER", or);
+@@ -577,6 +611,7 @@
+ printf(">");
+ if (or == 0)
+ printf("<invalid>%d", flags);
++#endif
+ }
- printf("%#x<", flags);
- _EOF_
--egrep "^#[[:space:]]*define[[:space:]]+MSG_[A-Z]+[[:space:]]+0x[0-9]+[[:space:]]*" $include_dir/sys/socket.h | \
-+ for include_dir in $include_dirs ; do if test -e $include_dir/$file ; then \
-+egrep "^#[[:space:]]*define[[:space:]]+MSG_[A-Z]*" $include_dir/bits/socket.h ; fi ; done | \
- awk '{ for (i = 1; i <= NF; i++) \
+ /*
+@@ -628,7 +663,10 @@
if ($i ~ /define/) \
break; \
+ ++i; \
+- printf "\tif(!((flags>0)^((%s)>0)))\n\t\tif_print_or(flags, %s, or);\n", $i, $i }'
++ if ($i) { \
++ printf "#ifdef %s\n", $i; \
++ printf "\tif(!((flags>0)^((%s)>0)))\n\t\tif_print_or(flags, %s, or);\n", $i, $i; \
++ printf "#endif\n" } }'
+ cat <<_EOF_
+ printf(">");
+ }
+@@ -649,7 +687,10 @@
+ if ($i ~ /define/) \
+ break; \
+ ++i; \
+- printf "\tcase %s:\n\t\tprintf(\"%s\");\n\t\tbreak;\n", $i, $i }'
++ if ($i) { \
++ printf "#ifdef %s\n", $i; \
++ printf "\tcase %s:\n\t\tprintf(\"%s\");\n\t\tbreak;\n", $i, $i; \
++ printf "#endif\n" } }'
+ cat <<_EOF_
+ default:
+ switch (sig) {
--- /dev/null
+++ b/src/usr.bin/kdump/stat16.h
@@ -0,0 +1,55 @@
@@ -328,32 +344,3 @@
+#define _BIRTH_PADSIZE (2*(8 - sizeof (long)))
+ char __birth_padding[_BIRTH_PADSIZE];
+ };
---- a/src/usr.bin/kdump/mkioctls
-+++ b/src/usr.bin/kdump/mkioctls
-@@ -15,21 +15,23 @@
- echo "usage: sh $0 [-s] include-dir"
- exit 1
- fi
-+include_dirs="$*"
-
- LC_ALL=C; export LC_ALL
-
- # Build a list of headers that have ioctls in them.
- # XXX should we use an ANSI cpp?
- ioctl_includes=`
-- cd $1
-- find -H -s * -name '*.h' |
-+ for include_dir in $include_dirs ; do
-+ cd $include_dir
-+ find -H -s * -name '*.h' ; done |
- xargs egrep -l \
- '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' |
- awk '{printf("#include <%s>\\\\n", $1)}'
- `
-
- awk -v x="$ioctl_includes" 'BEGIN {print x}' |
-- $CPP -I$1 -dM -DCOMPAT_43TTY - |
-+ $CPP -dM -DCOMPAT_43TTY - |
- awk -v ioctl_includes="$ioctl_includes" -v use_switch="$use_switch" '
- BEGIN {
- print "/* XXX obnoxious prerequisites. */"
Modified: trunk/freebsd-utils/debian/patches/035_nfs.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/035_nfs.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/035_nfs.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -52,7 +52,7 @@
--- a/src/usr.sbin/mountd/mountd.c
+++ b/src/usr.sbin/mountd/mountd.c
-@@ -2118,12 +2118,18 @@
+@@ -2115,12 +2115,18 @@
if (!strcmp(seclist, "sys"))
flavor = AUTH_SYS;
Deleted: trunk/freebsd-utils/debian/patches/039_geom.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/039_geom.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/039_geom.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,25 +0,0 @@
---- a/src/sbin/geom/misc/subr.c
-+++ b/src/sbin/geom/misc/subr.c
-@@ -177,7 +177,7 @@
- if (*s != '\0')
- return (EINVAL);
- done:
-- if ((OFF_MAX / unit) < mult || (OFF_MAX / mult / unit) < number)
-+ if ((INT64_MAX / unit) < mult || (INT64_MAX / mult / unit) < number)
- return (ERANGE);
- number *= mult * unit;
- if (number % sectorsize)
---- a/src/sys/crypto/sha2/sha2.c
-+++ b/src/sys/crypto/sha2/sha2.c
-@@ -67,8 +67,10 @@
- *
- */
-
--#if defined(__bsdi__) || defined(__FreeBSD__)
-+#if defined(_KERNEL) && (defined(__bsdi__) || defined(__FreeBSD__))
- #define assert(x)
-+#else
-+#include <assert.h>
- #endif
-
-
Deleted: trunk/freebsd-utils/debian/patches/ifconfig_nojail.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/ifconfig_nojail.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/ifconfig_nojail.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,83 +0,0 @@
-
-Merged in SVN (rev 231642).
-
---- a/src/sbin/ifconfig/Makefile
-+++ b/src/sbin/ifconfig/Makefile
-@@ -35,8 +35,8 @@
- SRCS+= ifgif.c # GIF reversed header workaround
-
- SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support
--DPADD+= ${LIBBSDXML} ${LIBJAIL} ${LIBSBUF}
--LDADD+= -lbsdxml -ljail -lsbuf
-+DPADD+= ${LIBBSDXML} ${LIBSBUF}
-+LDADD+= -lbsdxml -lsbuf
-
- SRCS+= ifcarp.c # SIOC[GS]VH support
- SRCS+= ifgroup.c # ...
-@@ -56,6 +56,11 @@
- DPADD+= ${LIBIPX}
- LDADD+= -lipx
- .endif
-+.if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE)
-+CFLAGS+= -DJAIL
-+DPADD+= ${LIBJAIL}
-+LDADD+= -ljail
-+.endif
-
- MAN= ifconfig.8
-
---- a/src/sbin/ifconfig/ifconfig.c
-+++ b/src/sbin/ifconfig/ifconfig.c
-@@ -66,7 +66,9 @@
- #include <err.h>
- #include <errno.h>
- #include <fcntl.h>
-+#ifdef JAIL
- #include <jail.h>
-+#endif
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -255,6 +257,7 @@
- ifconfig(argc, argv, 1, NULL);
- exit(0);
- }
-+#ifdef JAIL
- /*
- * NOTE: We have to special-case the `-vnet' command
- * right here as we would otherwise fail when trying
-@@ -268,6 +271,7 @@
- ifconfig(argc, argv, 0, NULL);
- exit(0);
- }
-+#endif
- errx(1, "interface %s does not exist", ifname);
- }
- }
-@@ -688,6 +692,7 @@
- err(1, "SIOCDIFPHYADDR");
- }
-
-+#ifdef JAIL
- static void
- setifvnet(const char *jname, int dummy __unused, int s,
- const struct afswtch *afp)
-@@ -715,6 +720,7 @@
- if (ioctl(s, SIOCSIFRVNET, &my_ifr) < 0)
- err(1, "SIOCSIFRVNET(%d, %s)", my_ifr.ifr_jid, my_ifr.ifr_name);
- }
-+#endif
-
- static void
- setifnetmask(const char *addr, int dummy __unused, int s,
-@@ -1159,8 +1165,10 @@
- DEF_CMD_ARG2("tunnel", settunnel),
- DEF_CMD("-tunnel", 0, deletetunnel),
- DEF_CMD("deletetunnel", 0, deletetunnel),
-+#ifdef JAIL
- DEF_CMD_ARG("vnet", setifvnet),
- DEF_CMD_ARG("-vnet", setifrvnet),
-+#endif
- DEF_CMD("link0", IFF_LINK0, setifflags),
- DEF_CMD("-link0", -IFF_LINK0, setifflags),
- DEF_CMD("link1", IFF_LINK1, setifflags),
Modified: trunk/freebsd-utils/debian/patches/makefiles.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/makefiles.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/makefiles.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -17,7 +17,7 @@
+LDADD+= -lbsd -lfreebsd-glue
+
- SRCS+= ifcarp.c # SIOC[GS]VH support
+ SRCS+= carp.c # SIOC[GS]VH support
SRCS+= ifgroup.c # ...
SRCS+= ifpfsync.c # pfsync(4) support
--- a/src/usr.sbin/ppp/Makefile
@@ -34,7 +34,7 @@
+LDADD= -lcrypt -lutil-freebsd -lz
DPADD= ${LIBCRYPT} ${LIBMD} ${LIBUTIL} ${LIBZ}
- .SUFFIXES: .8 .8.m4
+ .if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR)
--- a/src/usr.sbin/nfsd/Makefile
+++ b/src/usr.sbin/nfsd/Makefile
@@ -3,5 +3,7 @@
@@ -92,7 +92,7 @@
.include <bsd.prog.mk>
--- a/src/sbin/pfctl/Makefile
+++ b/src/sbin/pfctl/Makefile
-@@ -22,7 +22,7 @@
+@@ -18,7 +18,7 @@
YFLAGS=
@@ -103,7 +103,7 @@
.include <bsd.prog.mk>
--- a/src/usr.sbin/authpf/Makefile
+++ b/src/usr.sbin/authpf/Makefile
-@@ -6,7 +6,7 @@
+@@ -5,7 +5,7 @@
PROG= authpf
MAN= authpf.8
BINOWN= root
@@ -112,12 +112,12 @@
BINMODE= 6555
SRCS= authpf.c
-@@ -16,7 +16,7 @@
+@@ -13,7 +13,7 @@
# XXX ALTQ:
CFLAGS+= -DENABLE_ALTQ
-LDADD+= -lm -lmd -lutil
-+LDADD+= -lm
++LDADD+= -lm -lutil-freebsd
DPADD+= ${LIBM} ${LIBMD} ${LIBUTIL}
WARNS?= 3
@@ -263,15 +263,6 @@
.if ${MK_NETGRAPH_SUPPORT} != "no"
SRCS+= netgraph.c
---- a/src/sbin/atacontrol/Makefile
-+++ b/src/sbin/atacontrol/Makefile
-@@ -3,4 +3,6 @@
- PROG= atacontrol
- MAN= atacontrol.8
-
-+LDADD+= -lfreebsd-glue
-+
- .include <bsd.prog.mk>
--- a/src/sbin/umount/Makefile
+++ b/src/sbin/umount/Makefile
@@ -6,6 +6,8 @@
@@ -287,13 +278,13 @@
+++ b/src/sbin/route/Makefile
@@ -9,6 +9,8 @@
WARNS?= 3
- CLEANFILES+=keywords.h _keywords.tmp
+ CLEANFILES+=keywords.h
+LDADD+= -lfreebsd-glue
+
CFLAGS+= -DNS
-
- .if ${MK_INET6_SUPPORT} != "no"
+ .if ${MK_INET_SUPPORT} != "no"
+ CFLAGS+= -DINET
--- a/src/sbin/mount/Makefile
+++ b/src/sbin/mount/Makefile
@@ -7,6 +7,8 @@
@@ -317,8 +308,8 @@
+
+LDADD+= -lfreebsd-glue
- YFLAGS+=-v
- CFLAGS+=-I. -I${.CURDIR}
+ NO_WMISSING_VARIABLE_DECLARATIONS=
+
--- a/src/sbin/camcontrol/Makefile
+++ b/src/sbin/camcontrol/Makefile
@@ -12,7 +12,7 @@
@@ -371,7 +362,7 @@
+.include <bsd.subdir.mk>
--- /dev/null
+++ b/src/sbin/Makefile
-@@ -0,0 +1,42 @@
+@@ -0,0 +1,36 @@
+SUBDIR = \
+ devd \
+ ifconfig \
@@ -385,7 +376,6 @@
+
+.if !defined(RESCUE)
+SUBDIR += \
-+ atacontrol \
+ camcontrol \
+ ccdconfig \
+ devfs \
@@ -395,14 +385,9 @@
+ kldconfig \
+ mount \
+ mount_cd9660 \
-+ mount_ext2fs \
-+ mount_hpfs \
+ mount_msdosfs \
+ mount_nfs \
-+ mount_ntfs \
+ mount_nullfs \
-+ mount_reiserfs \
-+ mount_std \
+ mount_udf \
+ mount_unionfs \
+ nfsiod \
Modified: trunk/freebsd-utils/debian/patches/mount_cli_compat.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/mount_cli_compat.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/mount_cli_compat.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -7,20 +7,26 @@
--- a/src/sbin/mount/mount.c
+++ b/src/sbin/mount/mount.c
-@@ -252,8 +252,11 @@
+@@ -253,7 +253,7 @@
options = NULL;
vfslist = NULL;
vfstype = "ufs";
-- while ((ch = getopt(argc, argv, "adF:flno:prt:uvw")) != -1)
-+ while ((ch = getopt(argc, argv, "adF:flno:prt:uvwO:")) != -1)
+- while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvw")) != -1)
++ while ((ch = getopt(argc, argv, "adF:fLlno:prt:uvwO:")) != -1)
switch (ch) {
-+ case 'O':
-+ /* Compatibility glue. */
-+ break;
case 'a':
all = 1;
+@@ -277,6 +277,9 @@
+ case 'n':
+ /* For compatibility with the Linux version of mount. */
break;
-@@ -764,6 +767,11 @@
++ case 'O':
++ /* For compatibility with the Linux version of mount. */
++ break;
+ case 'o':
+ if (*optarg) {
+ options = catopt(options, optarg);
+@@ -774,6 +777,11 @@
} else if (strncmp(p, groupquotaeq,
sizeof(groupquotaeq) - 1) == 0) {
continue;
Deleted: trunk/freebsd-utils/debian/patches/mount_n.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/mount_n.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/mount_n.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,36 +0,0 @@
-
-From HEAD (SVN rev 253372)
-
---- a/src/sbin/mount/mount.c
-+++ b/src/sbin/mount/mount.c
-@@ -252,7 +252,7 @@
- options = NULL;
- vfslist = NULL;
- vfstype = "ufs";
-- while ((ch = getopt(argc, argv, "adF:flo:prt:uvw")) != -1)
-+ while ((ch = getopt(argc, argv, "adF:flno:prt:uvw")) != -1)
- switch (ch) {
- case 'a':
- all = 1;
-@@ -269,6 +269,9 @@
- case 'l':
- late = 1;
- break;
-+ case 'n':
-+ /* For compatibility with the Linux version of mount. */
-+ break;
- case 'o':
- if (*optarg) {
- options = catopt(options, optarg);
---- a/src/sbin/mount/mount.8
-+++ b/src/sbin/mount/mount.8
-@@ -111,6 +111,9 @@
- .Fl a
- option, also mount those file systems which are marked as
- .Dq Li late .
-+.It Fl n
-+For compatibility with some other implementations, this flag is
-+currently a no-op.
- .It Fl o
- Options are specified with a
- .Fl o
Modified: trunk/freebsd-utils/debian/patches/netstat_numeric_default.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/netstat_numeric_default.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/netstat_numeric_default.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -7,7 +7,7 @@
--- a/src/usr.bin/netstat/route.c
+++ b/src/usr.bin/netstat/route.c
-@@ -616,12 +616,7 @@
+@@ -622,12 +622,7 @@
{
struct sockaddr_in *sockin = (struct sockaddr_in *)sa;
Modified: trunk/freebsd-utils/debian/patches/pf_regex_c.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/pf_regex_c.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/pf_regex_c.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -2,7 +2,7 @@
# You can execute this patch in order to generate a patched directory
-for d in b/contrib/pf b/sys/contrib/pf ; do \
+for d in b/src/contrib/pf ; do \
for f in $(find $d -type f -name \*.c -or -name \*.y -or -name \*.h | grep -v "/\.svn/") ; do \
sed -i $f \
-e 's/defined\( \|\t\)*(\( \|\t\)*__FreeBSD__\( \|\t\)*)/1/g' \
@@ -91,312 +91,6 @@
#define INTPTR(x) (intptr_t)x
#else
#define INTPTR(x) x
---- a/src/contrib/pf/pfctl/parse.y
-+++ b/src/contrib/pf/pfctl/parse.y
-@@ -33,7 +33,7 @@
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/stat.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/sysctl.h>
- #endif
- #include <net/if.h>
-@@ -2227,7 +2227,7 @@
- }
- free($9.queues.pqname);
- }
--#ifdef __FreeBSD__
-+#if 1
- r.divert.port = $9.divert.port;
- #else
- if ((r.divert.port = $9.divert.port)) {
-@@ -2372,7 +2372,7 @@
- filter_opts.rtableid = $2;
- }
- | DIVERTTO portplain {
--#ifdef __FreeBSD__
-+#if 1
- filter_opts.divert.port = $2.a;
- if (!filter_opts.divert.port) {
- yyerror("invalid divert port: %u", ntohs($2.a));
-@@ -2381,7 +2381,7 @@
- #endif
- }
- | DIVERTTO STRING PORT portplain {
--#ifndef __FreeBSD__
-+#if 0
- if ((filter_opts.divert.addr = host($2)) == NULL) {
- yyerror("could not parse divert address: %s",
- $2);
-@@ -2399,7 +2399,7 @@
- }
- }
- | DIVERTREPLY {
--#ifdef __FreeBSD__
-+#if 1
- yyerror("divert-reply has no meaning in FreeBSD pf(4)");
- YYERROR;
- #else
-@@ -2865,7 +2865,7 @@
- char *buf;
-
- /* ie. for 10/8 parsing */
--#ifdef __FreeBSD__
-+#if 1
- if (asprintf(&buf, "%lld/%lld", (long long)$1, (long long)$3) == -1)
- #else
- if (asprintf(&buf, "%lld/%lld", $1, $3) == -1)
-@@ -6059,7 +6059,7 @@
- int
- rt_tableid_max(void)
- {
--#ifdef __FreeBSD__
-+#if 1
- int fibs;
- size_t l = sizeof(fibs);
-
---- a/src/contrib/pf/pfctl/pfctl_altq.c
-+++ b/src/contrib/pf/pfctl/pfctl_altq.c
-@@ -77,7 +77,7 @@
- double);
- static double sc_x2y(struct service_curve *, double);
-
--#ifdef __FreeBSD__
-+#if 1
- u_int32_t getifspeed(int, char *);
- #else
- u_int32_t getifspeed(char *);
-@@ -153,7 +153,7 @@
- return;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (a->local_flags & PFALTQ_FLAG_IF_REMOVED)
- printf("INACTIVE ");
- #endif
-@@ -193,7 +193,7 @@
- {
- unsigned int i;
-
--#ifdef __FreeBSD__
-+#if 1
- if (a->local_flags & PFALTQ_FLAG_IF_REMOVED)
- printf("INACTIVE ");
- #endif
-@@ -239,7 +239,7 @@
- if (bw->bw_absolute > 0)
- pa->ifbandwidth = bw->bw_absolute;
- else
--#ifdef __FreeBSD__
-+#if 1
- if ((rate = getifspeed(pf->dev, pa->ifname)) == 0) {
- #else
- if ((rate = getifspeed(pa->ifname)) == 0) {
-@@ -1095,7 +1095,7 @@
- return (buf);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- /*
- * XXX
- * FreeBSD does not have SIOCGIFDATA.
-@@ -1150,7 +1150,7 @@
- sizeof(ifr.ifr_name))
- errx(1, "getifmtu: strlcpy");
- if (ioctl(s, SIOCGIFMTU, (caddr_t)&ifr) == -1)
--#ifdef __FreeBSD__
-+#if 1
- ifr.ifr_mtu = 1500;
- #else
- err(1, "SIOCGIFMTU");
---- a/src/contrib/pf/pfctl/pfctl.c
-+++ b/src/contrib/pf/pfctl/pfctl.c
-@@ -39,7 +39,7 @@
- #include <sys/socket.h>
- #include <sys/stat.h>
-
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/endian.h>
- #endif
-
-@@ -251,7 +251,7 @@
- if (ioctl(dev, DIOCSTART)) {
- if (errno == EEXIST)
- errx(1, "pf already enabled");
--#ifdef __FreeBSD__
-+#if 1
- else if (errno == ESRCH)
- errx(1, "pfil registeration failed");
- #endif
-@@ -1585,7 +1585,7 @@
- pf->limit[PF_LIMIT_TABLE_ENTRIES] = PFR_KENTRY_HIWAT;
-
- mib[0] = CTL_HW;
--#ifdef __FreeBSD__
-+#if 1
- mib[1] = HW_PHYSMEM;
- #else
- mib[1] = HW_PHYSMEM64;
-@@ -2202,7 +2202,7 @@
- /* turn off options */
- opts &= ~ (PF_OPT_DISABLE | PF_OPT_ENABLE);
- clearopt = showopt = debugopt = NULL;
--#if defined(__FreeBSD__) && !defined(ENABLE_ALTQ)
-+#if 1 && !defined(ENABLE_ALTQ)
- altqsupport = 0;
- #else
- altqsupport = 1;
---- a/src/contrib/pf/pfctl/pfctl.h
-+++ b/src/contrib/pf/pfctl/pfctl.h
-@@ -86,7 +86,7 @@
- int pfctl_show_ifaces(const char *, int);
- FILE *pfctl_fopen(const char *, const char *);
-
--#ifdef __FreeBSD__
-+#if 1
- extern int altqsupport;
- extern int dummynetsupport;
- #define HTONL(x) (x) = htonl((__uint32_t)(x))
---- a/src/contrib/pf/pfctl/pfctl_optimize.c
-+++ b/src/contrib/pf/pfctl/pfctl_optimize.c
-@@ -862,7 +862,7 @@
- break;
- }
- }
--#ifdef __FreeBSD__
-+#if 1
- if (por2 == NULL)
- #else
- if (por2 == TAILQ_END(&block->sb_rules))
---- a/src/contrib/pf/pfctl/pfctl_parser.c
-+++ b/src/contrib/pf/pfctl/pfctl_parser.c
-@@ -580,7 +580,7 @@
- s->src_nodes, "");
- for (i = 0; i < SCNT_MAX; i++) {
- printf(" %-25s %14lld ", pf_scounters[i],
--#ifdef __FreeBSD__
-+#if 1
- (long long)s->scounters[i]);
- #else
- s->scounters[i]);
-@@ -606,7 +606,7 @@
- printf("Limit Counters\n");
- for (i = 0; i < LCNT_MAX; i++) {
- printf(" %-25s %14lld ", pf_lcounters[i],
--#ifdef __FreeBSD__
-+#if 1
- (unsigned long long)s->lcounters[i]);
- #else
- s->lcounters[i]);
-@@ -655,7 +655,7 @@
- sn->expire, min, sec);
- }
- printf(", %llu pkts, %llu bytes",
--#ifdef __FreeBSD__
-+#if 1
- (unsigned long long)(sn->packets[0] + sn->packets[1]),
- (unsigned long long)(sn->bytes[0] + sn->bytes[1]));
- #else
-@@ -1019,7 +1019,7 @@
- if (r->rtableid != -1)
- printf(" rtable %u", r->rtableid);
- if (r->divert.port) {
--#ifdef __FreeBSD__
-+#if 1
- printf(" divert-to %u", ntohs(r->divert.port));
- #else
- if (PF_AZERO(&r->divert.addr, r->af)) {
---- a/src/contrib/pf/pfctl/pfctl_parser.h
-+++ b/src/contrib/pf/pfctl/pfctl_parser.h
-@@ -159,7 +159,7 @@
- } data;
- };
-
--#ifdef __FreeBSD__
-+#if 1
- /*
- * XXX
- * Absolutely this is not correct location to define this.
---- a/src/contrib/pf/pfctl/pfctl_qstats.c
-+++ b/src/contrib/pf/pfctl/pfctl_qstats.c
-@@ -89,7 +89,7 @@
- struct pf_altq_node *root = NULL, *node;
- int nodes, dotitle = (opts & PF_OPT_SHOWALL);
-
--#ifdef __FreeBSD__
-+#if 1
- if (!altqsupport)
- return (-1);
- #endif
-@@ -118,7 +118,7 @@
- for (node = root; node != NULL; node = node->next) {
- if (iface != NULL && strcmp(node->altq.ifname, iface))
- continue;
--#ifdef __FreeBSD__
-+#if 1
- if (node->altq.local_flags & PFALTQ_FLAG_IF_REMOVED)
- continue;
- #endif
-@@ -161,7 +161,7 @@
- warn("DIOCGETALTQ");
- return (-1);
- }
--#ifdef __FreeBSD__
-+#if 1
- if (pa.altq.qid > 0 &&
- !(pa.altq.local_flags & PFALTQ_FLAG_IF_REMOVED)) {
- #else
-@@ -184,7 +184,7 @@
- pfctl_insert_altq_node(root, pa.altq, qstats);
- }
- }
--#ifdef __FreeBSD__
-+#if 1
- else if (pa.altq.local_flags & PFALTQ_FLAG_IF_REMOVED) {
- memset(&qstats.data, 0, sizeof(qstats.data));
- if ((node = pfctl_find_altq_node(*root, pa.altq.qname,
-@@ -303,7 +303,7 @@
- if (a->altq.qid == 0)
- return;
-
--#ifdef __FreeBSD__
-+#if 1
- if (a->altq.local_flags & PFALTQ_FLAG_IF_REMOVED)
- return;
- #endif
---- a/src/contrib/pf/pfctl/pf_print_state.c
-+++ b/src/contrib/pf/pfctl/pf_print_state.c
-@@ -35,7 +35,7 @@
-
- #include <sys/types.h>
- #include <sys/socket.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/endian.h>
- #define betoh64 be64toh
- #endif
-@@ -322,7 +322,7 @@
- bcopy(s->bytes[0], &bytes[0], sizeof(u_int64_t));
- bcopy(s->bytes[1], &bytes[1], sizeof(u_int64_t));
- printf(", %llu:%llu pkts, %llu:%llu bytes",
--#ifdef __FreeBSD__
-+#if 1
- (unsigned long long)betoh64(packets[0]),
- (unsigned long long)betoh64(packets[1]),
- (unsigned long long)betoh64(bytes[0]),
-@@ -352,7 +352,7 @@
-
- bcopy(&s->id, &id, sizeof(u_int64_t));
- printf(" id: %016llx creatorid: %08x",
--#ifdef __FreeBSD__
-+#if 1
- (unsigned long long)betoh64(id), ntohl(s->creatorid));
- #else
- betoh64(id), ntohl(s->creatorid));
--- a/src/contrib/pf/pflogd/pflogd.c
+++ b/src/contrib/pf/pflogd/pflogd.c
@@ -51,7 +51,7 @@
@@ -513,8196 +207,260 @@
pfr.rule.flags = (proto == IPPROTO_TCP ? TH_SYN : 0);
pfr.rule.flagset = (proto == IPPROTO_TCP ?
(TH_SYN|TH_ACK|TH_FIN|TH_RST) : 0);
---- a/src/sys/contrib/pf/net/if_pflog.c
-+++ b/src/sys/contrib/pf/net/if_pflog.c
+--- a/src/sbin/pfctl/parse.y
++++ b/src/sbin/pfctl/parse.y
@@ -33,7 +33,7 @@
- * PURPOSE.
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #include "opt_inet.h"
- #include "opt_inet6.h"
- #include "opt_bpf.h"
-@@ -64,7 +64,7 @@
- #include <sys/mbuf.h>
- #include <sys/proc.h>
+ #include <sys/types.h>
#include <sys/socket.h>
+ #include <sys/stat.h>
-#ifdef __FreeBSD__
+#if 1
- #include <sys/kernel.h>
- #include <sys/limits.h>
- #include <sys/malloc.h>
-@@ -75,7 +75,7 @@
- #endif
-
- #include <net/if.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <net/if_clone.h>
- #endif
- #include <net/if_types.h>
-@@ -99,7 +99,7 @@
- #include <net/pfvar.h>
- #include <net/if_pflog.h>
-
--#ifdef __FreeBSD__
-+#if 1
- #ifdef INET
- #include <machine/in_cksum.h>
- #endif /* INET */
-@@ -115,14 +115,14 @@
-
- void pflogattach(int);
- int pflogoutput(struct ifnet *, struct mbuf *, struct sockaddr *,
--#ifdef __FreeBSD__
-+#if 1
- struct route *);
- #else
- struct rtentry *);
- #endif
- int pflogioctl(struct ifnet *, u_long, caddr_t);
- void pflogstart(struct ifnet *);
--#ifdef __FreeBSD__
-+#if 1
- static int pflog_clone_create(struct if_clone *, int, caddr_t);
- static void pflog_clone_destroy(struct ifnet *);
- #else
-@@ -131,7 +131,7 @@
- #endif
-
- LIST_HEAD(, pflog_softc) pflogif_list;
--#ifdef __FreeBSD__
-+#if 1
- IFC_SIMPLE_DECLARE(pflog, 1);
- #else
- struct if_clone pflog_cloner =
-@@ -150,7 +150,7 @@
- if_clone_attach(&pflog_cloner);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- static int
- pflog_clone_create(struct if_clone *ifc, int unit, caddr_t param)
- #else
-@@ -170,7 +170,7 @@
- return (ENOMEM);
-
- pflogif->sc_unit = unit;
--#ifdef __FreeBSD__
-+#if 1
- ifp = pflogif->sc_ifp = if_alloc(IFT_PFLOG);
- if (ifp == NULL) {
- free(pflogif, M_DEVBUF);
-@@ -186,18 +186,18 @@
- ifp->if_ioctl = pflogioctl;
- ifp->if_output = pflogoutput;
- ifp->if_start = pflogstart;
--#ifndef __FreeBSD__
-+#if 0
- ifp->if_type = IFT_PFLOG;
- #endif
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
- ifp->if_hdrlen = PFLOG_HDRLEN;
- if_attach(ifp);
--#ifndef __FreeBSD__
-+#if 0
- if_alloc_sadl(ifp);
- #endif
-
- #if NBPFILTER > 0
--#ifdef __FreeBSD__
-+#if 1
- bpfattach(ifp, DLT_PFLOG, PFLOG_HDRLEN);
- #else
- bpfattach(&pflogif->sc_if.if_bpf, ifp, DLT_PFLOG, PFLOG_HDRLEN);
-@@ -205,13 +205,13 @@
- #endif
-
- s = splnet();
--#ifdef __FreeBSD__
-+#if 1
- /* XXX: Why pf(4) lock?! Better add a pflog lock?! */
- PF_LOCK();
- #endif
- LIST_INSERT_HEAD(&pflogif_list, pflogif, sc_list);
- pflogifs[unit] = ifp;
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -219,7 +219,7 @@
- return (0);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- static void
- pflog_clone_destroy(struct ifnet *ifp)
- #else
-@@ -231,12 +231,12 @@
- int s;
-
- s = splnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- pflogifs[pflogif->sc_unit] = NULL;
- LIST_REMOVE(pflogif, sc_list);
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -245,11 +245,11 @@
- bpfdetach(ifp);
- #endif
- if_detach(ifp);
--#ifdef __FreeBSD__
-+#if 1
- if_free(ifp);
- #endif
- free(pflogif, M_DEVBUF);
--#ifndef __FreeBSD__
-+#if 0
- return (0);
- #endif
- }
-@@ -261,12 +261,12 @@
- pflogstart(struct ifnet *ifp)
- {
- struct mbuf *m;
--#ifndef __FreeBSD__
-+#if 0
- int s;
- #endif
-
- for (;;) {
--#ifdef __FreeBSD__
-+#if 1
- IF_LOCK(&ifp->if_snd);
- _IF_DROP(&ifp->if_snd);
- _IF_DEQUEUE(&ifp->if_snd, m);
-@@ -287,7 +287,7 @@
-
- int
- pflogoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
--#ifdef __FreeBSD__
-+#if 1
- struct route *rt)
- #else
- struct rtentry *rt)
-@@ -303,7 +303,7 @@
- {
- switch (cmd) {
- case SIOCSIFFLAGS:
--#ifdef __FreeBSD__
-+#if 1
- if (ifp->if_flags & IFF_UP)
- ifp->if_drv_flags |= IFF_DRV_RUNNING;
- else
-@@ -355,7 +355,7 @@
- sizeof(hdr.ruleset));
- }
- if (rm->log & PF_LOG_SOCKET_LOOKUP && !pd->lookup.done)
--#ifdef __FreeBSD__
-+#if 1
- /*
- * XXX: This should not happen as we force an early lookup
- * via debug.pfugidhack
-@@ -387,7 +387,7 @@
-
- ifn->if_opackets++;
- ifn->if_obytes += m->m_pkthdr.len;
--#ifdef __FreeBSD__
-+#if 1
- BPF_MTAP2(ifn, &hdr, PFLOG_HDRLEN, m);
- #else
- bpf_mtap_hdr(ifn->if_bpf, (char *)&hdr, PFLOG_HDRLEN, m,
-@@ -398,7 +398,7 @@
- return (0);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- static int
- pflog_modevent(module_t mod, int type, void *data)
- {
---- a/src/sys/contrib/pf/net/if_pflog.h
-+++ b/src/sys/contrib/pf/net/if_pflog.h
-@@ -30,7 +30,7 @@
- #define PFLOGIFS_MAX 16
-
- struct pflog_softc {
--#ifdef __FreeBSD__
-+#if 1
- struct ifnet *sc_ifp; /* the interface pointer */
- #else
- struct ifnet sc_if; /* the interface */
-@@ -74,7 +74,7 @@
- #define OLD_PFLOG_HDRLEN sizeof(struct old_pfloghdr)
-
- #ifdef _KERNEL
--#ifdef __FreeBSD__
-+#if 1
- struct pf_rule;
- struct pf_ruleset;
- struct pfi_kif;
---- a/src/sys/contrib/pf/net/if_pflow.h
-+++ b/src/sys/contrib/pf/net/if_pflow.h
-@@ -66,7 +66,7 @@
- unsigned int sc_maxcount;
- u_int64_t sc_gcounter;
- struct ip_moptions sc_imo;
--#ifdef __FreeBSD__
-+#if 1
- struct callout sc_tmo;
- #else
- struct timeout sc_tmo;
---- a/src/sys/contrib/pf/net/if_pfsync.c
-+++ b/src/sys/contrib/pf/net/if_pfsync.c
-@@ -52,7 +52,7 @@
- * 1.170 - SIOCSIFMTU checks
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #include "opt_inet.h"
- #include "opt_inet6.h"
- #include "opt_pf.h"
-@@ -71,7 +71,7 @@
-
- #include <sys/param.h>
- #include <sys/kernel.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/bus.h>
- #include <sys/interrupt.h>
- #include <sys/priv.h>
-@@ -81,7 +81,7 @@
- #include <sys/time.h>
- #include <sys/mbuf.h>
- #include <sys/socket.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/endian.h>
- #include <sys/malloc.h>
- #include <sys/module.h>
-@@ -95,19 +95,19 @@
- #include <sys/timeout.h>
- #endif
#include <sys/sysctl.h>
--#ifndef __FreeBSD__
-+#if 0
- #include <sys/pool.h>
#endif
-
#include <net/if.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <net/if_clone.h>
- #endif
- #include <net/if_types.h>
- #include <net/route.h>
- #include <net/bpf.h>
- #include <net/netisr.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <net/vnet.h>
- #endif
-
-@@ -127,7 +127,7 @@
- #include <netinet6/nd6.h>
- #endif /* INET6 */
-
--#ifndef __FreeBSD__
-+#if 0
- #include "carp.h"
- #endif
- #if NCARP > 0
-@@ -137,7 +137,7 @@
- #include <net/pfvar.h>
- #include <net/if_pfsync.h>
-
--#ifndef __FreeBSD__
-+#if 0
- #include "bpfilter.h"
- #include "pfsync.h"
- #endif
-@@ -222,7 +222,7 @@
- TAILQ_ENTRY(pfsync_deferral) pd_entry;
- struct pf_state *pd_st;
- struct mbuf *pd_m;
--#ifdef __FreeBSD__
-+#if 1
- struct callout pd_tmo;
- #else
- struct timeout pd_tmo;
-@@ -238,14 +238,14 @@
- #endif
-
- struct pfsync_softc {
--#ifdef __FreeBSD__
-+#if 1
- struct ifnet *sc_ifp;
- #else
- struct ifnet sc_if;
- #endif
- struct ifnet *sc_sync_if;
-
--#ifdef __FreeBSD__
-+#if 1
- uma_zone_t sc_pool;
- #else
- struct pool sc_pool;
-@@ -255,7 +255,7 @@
-
- struct in_addr sc_sync_peer;
- u_int8_t sc_maxupdates;
--#ifdef __FreeBSD__
-+#if 1
- int pfsync_sync_ok;
- #endif
-
-@@ -274,7 +274,7 @@
-
- u_int32_t sc_ureq_sent;
- int sc_bulk_tries;
--#ifdef __FreeBSD__
-+#if 1
- struct callout sc_bulkfail_tmo;
- #else
- struct timeout sc_bulkfail_tmo;
-@@ -283,7 +283,7 @@
- u_int32_t sc_ureq_received;
- struct pf_state *sc_bulk_next;
- struct pf_state *sc_bulk_last;
--#ifdef __FreeBSD__
-+#if 1
- struct callout sc_bulk_tmo;
- #else
- struct timeout sc_bulk_tmo;
-@@ -291,14 +291,14 @@
-
- TAILQ_HEAD(, tdb) sc_tdb_q;
-
--#ifdef __FreeBSD__
-+#if 1
- struct callout sc_tmo;
- #else
- struct timeout sc_tmo;
- #endif
- };
-
--#ifdef __FreeBSD__
-+#if 1
- static MALLOC_DEFINE(M_PFSYNC, "pfsync", "pfsync data");
- static VNET_DEFINE(struct pfsync_softc *, pfsyncif) = NULL;
- #define V_pfsyncif VNET(pfsyncif)
-@@ -327,7 +327,7 @@
- #endif
-
- void pfsyncattach(int);
--#ifdef __FreeBSD__
-+#if 1
- int pfsync_clone_create(struct if_clone *, int, caddr_t);
- void pfsync_clone_destroy(struct ifnet *);
- #else
-@@ -338,7 +338,7 @@
- struct pf_state_peer *);
- void pfsync_update_net_tdb(struct pfsync_tdb *);
- int pfsyncoutput(struct ifnet *, struct mbuf *, struct sockaddr *,
--#ifdef __FreeBSD__
-+#if 1
- struct route *);
- #else
- struct rtentry *);
-@@ -366,18 +366,18 @@
- void pfsync_bulk_update(void *);
- void pfsync_bulk_fail(void *);
-
--#ifdef __FreeBSD__
-+#if 1
- /* XXX: ugly */
- #define betoh64 (unsigned long long)be64toh
- #define timeout_del callout_stop
- #endif
-
- #define PFSYNC_MAX_BULKTRIES 12
--#ifndef __FreeBSD__
-+#if 0
- int pfsync_sync_ok;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DEFINE(struct ifc_simple_data, pfsync_cloner_data);
- VNET_DEFINE(struct if_clone, pfsync_cloner);
- #define V_pfsync_cloner_data VNET(pfsync_cloner_data)
-@@ -394,7 +394,7 @@
- if_clone_attach(&pfsync_cloner);
- }
- int
--#ifdef __FreeBSD__
-+#if 1
- pfsync_clone_create(struct if_clone *ifc, int unit, caddr_t param)
- #else
- pfsync_clone_create(struct if_clone *ifc, int unit)
-@@ -407,7 +407,7 @@
- if (unit != 0)
- return (EINVAL);
-
--#ifdef __FreeBSD__
-+#if 1
- sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO);
- sc->pfsync_sync_ok = 1;
- #else
-@@ -418,7 +418,7 @@
- for (q = 0; q < PFSYNC_S_COUNT; q++)
- TAILQ_INIT(&sc->sc_qs[q]);
-
--#ifdef __FreeBSD__
-+#if 1
- sc->sc_pool = uma_zcreate("pfsync", PFSYNC_PLSIZE, NULL, NULL, NULL,
- NULL, UMA_ALIGN_PTR, 0);
- #else
-@@ -433,14 +433,14 @@
- sc->sc_len = PFSYNC_MINPKT;
- sc->sc_maxupdates = 128;
-
--#ifndef __FreeBSD__
-+#if 0
- sc->sc_imo.imo_membership = (struct in_multi **)malloc(
- (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_IPMOPTS,
- M_WAITOK | M_ZERO);
- sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- ifp = sc->sc_ifp = if_alloc(IFT_PFSYNC);
- if (ifp == NULL) {
- uma_zdestroy(sc->sc_pool);
-@@ -460,7 +460,7 @@
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
- ifp->if_hdrlen = sizeof(struct pfsync_header);
- ifp->if_mtu = ETHERMTU;
--#ifdef __FreeBSD__
-+#if 1
- callout_init(&sc->sc_tmo, CALLOUT_MPSAFE);
- callout_init_mtx(&sc->sc_bulk_tmo, &pf_task_mtx, 0);
- callout_init(&sc->sc_bulkfail_tmo, CALLOUT_MPSAFE);
-@@ -471,7 +471,7 @@
- #endif
-
- if_attach(ifp);
--#ifndef __FreeBSD__
-+#if 0
- if_alloc_sadl(ifp);
- #endif
-
-@@ -480,14 +480,14 @@
- #endif
-
- #if NBPFILTER > 0
--#ifdef __FreeBSD__
-+#if 1
- bpfattach(ifp, DLT_PFSYNC, PFSYNC_HDRLEN);
- #else
- bpfattach(&sc->sc_if.if_bpf, ifp, DLT_PFSYNC, PFSYNC_HDRLEN);
- #endif
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- V_pfsyncif = sc;
- #else
- pfsyncif = sc;
-@@ -496,7 +496,7 @@
- return (0);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- void
- #else
- int
-@@ -505,18 +505,18 @@
- {
- struct pfsync_softc *sc = ifp->if_softc;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- timeout_del(&sc->sc_bulkfail_tmo);
- timeout_del(&sc->sc_bulk_tmo);
- timeout_del(&sc->sc_tmo);
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- #if NCARP > 0
- #ifdef notyet
--#ifdef __FreeBSD__
-+#if 1
- if (!sc->pfsync_sync_ok)
- #else
- if (!pfsync_sync_ok)
-@@ -534,12 +534,12 @@
- while (sc->sc_deferred > 0)
- pfsync_undefer(TAILQ_FIRST(&sc->sc_deferrals), 0);
-
--#ifdef __FreeBSD__
-+#if 1
- UMA_DESTROY(sc->sc_pool);
- #else
- pool_destroy(&sc->sc_pool);
- #endif
--#ifdef __FreeBSD__
-+#if 1
- if_free(ifp);
- if (sc->sc_imo.imo_membership)
- pfsync_multicast_cleanup(sc);
-@@ -549,13 +549,13 @@
- free(sc, M_DEVBUF);
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- V_pfsyncif = NULL;
- #else
- pfsyncif = NULL;
- #endif
-
--#ifndef __FreeBSD__
-+#if 0
- return (0);
- #endif
- }
-@@ -564,11 +564,11 @@
- pfsync_if_dequeue(struct ifnet *ifp)
- {
- struct mbuf *m;
--#ifndef __FreeBSD__
-+#if 0
- int s;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- IF_LOCK(&ifp->if_snd);
- _IF_DROP(&ifp->if_snd);
- _IF_DEQUEUE(&ifp->if_snd, m);
-@@ -591,7 +591,7 @@
- struct mbuf *m;
-
- while ((m = pfsync_if_dequeue(ifp)) != NULL) {
--#ifndef __FreeBSD__
-+#if 0
- IF_DROP(&ifp->if_snd);
- #endif
- m_freem(m);
-@@ -603,7 +603,7 @@
- struct pf_state_peer *d)
- {
- if (s->scrub.scrub_flag && d->scrub == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- d->scrub = pool_get(&V_pf_state_scrub_pl, PR_NOWAIT | PR_ZERO);
- #else
- d->scrub = pool_get(&pf_state_scrub_pl, PR_NOWAIT | PR_ZERO);
-@@ -615,7 +615,7 @@
- return (0);
- }
-
--#ifndef __FreeBSD__
-+#if 0
- void
- pfsync_state_export(struct pfsync_state *sp, struct pf_state *st)
- {
-@@ -688,7 +688,7 @@
- int pool_flags;
- int error;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
-
- if (sp->creatorid == 0 && V_pf_status.debug >= PF_DEBUG_MISC) {
-@@ -701,7 +701,7 @@
- }
-
- if ((kif = pfi_kif_get(sp->ifname)) == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
-@@ -723,7 +723,7 @@
- r = pf_main_ruleset.rules[
- PF_RULESET_FILTER].active.ptr_array[ntohl(sp->rule)];
- else
--#ifdef __FreeBSD__
-+#if 1
- r = &V_pf_default_rule;
- #else
- r = &pf_default_rule;
-@@ -732,7 +732,7 @@
- if ((r->max_states && r->states_cur >= r->max_states))
- goto cleanup;
-
--#ifdef __FreeBSD__
-+#if 1
- if (flags & PFSYNC_SI_IOCTL)
- pool_flags = PR_WAITOK | PR_ZERO;
- else
-@@ -841,7 +841,7 @@
- error = ENOMEM;
- if (skw == sks)
- sks = NULL;
--#ifdef __FreeBSD__
-+#if 1
- if (skw != NULL)
- pool_put(&V_pf_state_key_pl, skw);
- if (sks != NULL)
-@@ -855,7 +855,7 @@
-
- cleanup_state: /* pf_state_insert frees the state keys */
- if (st) {
--#ifdef __FreeBSD__
-+#if 1
- if (st->dst.scrub)
- pool_put(&V_pf_state_scrub_pl, st->dst.scrub);
- if (st->src.scrub)
-@@ -873,13 +873,13 @@
- }
-
- void
--#ifdef __FreeBSD__
-+#if 1
- pfsync_input(struct mbuf *m, __unused int off)
- #else
- pfsync_input(struct mbuf *m, ...)
- #endif
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -895,7 +895,7 @@
- V_pfsyncstats.pfsyncs_ipackets++;
-
- /* verify that we have a sync interface configured */
--#ifdef __FreeBSD__
-+#if 1
- if (!sc || !sc->sc_sync_if || !V_pf_status.running)
- #else
- if (!sc || !sc->sc_sync_if || !pf_status.running)
-@@ -908,7 +908,7 @@
- goto done;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- sc->sc_ifp->if_ipackets++;
- sc->sc_ifp->if_ibytes += m->m_pkthdr.len;
- #else
-@@ -954,7 +954,7 @@
- pkt.src = ip->ip_src;
- pkt.flags = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- if (!bcmp(&ph->pfcksum, &V_pf_status.pf_chksum, PF_MD5_DIGEST_LENGTH))
- #else
- if (!bcmp(&ph->pfcksum, &pf_status.pf_chksum, PF_MD5_DIGEST_LENGTH))
-@@ -1005,14 +1005,14 @@
- clr = (struct pfsync_clr *)(mp->m_data + offp);
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++) {
- creatorid = clr[i].creatorid;
-
- if (clr[i].ifname[0] == '\0') {
--#ifdef __FreeBSD__
-+#if 1
- for (st = RB_MIN(pf_state_tree_id, &V_tree_id);
- st; st = nexts) {
- nexts = RB_NEXT(pf_state_tree_id, &V_tree_id, st);
-@@ -1031,14 +1031,14 @@
- continue;
-
- /* XXX correct? */
--#ifdef __FreeBSD__
-+#if 1
- for (sk = RB_MIN(pf_state_tree, &V_pf_statetbl);
- #else
- for (sk = RB_MIN(pf_state_tree, &pf_statetbl);
- #endif
- sk; sk = nextsk) {
- nextsk = RB_NEXT(pf_state_tree,
--#ifdef __FreeBSD__
-+#if 1
- &V_pf_statetbl, sk);
- #else
- &pf_statetbl, sk);
-@@ -1053,7 +1053,7 @@
- }
- }
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1079,7 +1079,7 @@
- sa = (struct pfsync_state *)(mp->m_data + offp);
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++) {
-@@ -1091,7 +1091,7 @@
- sp->dst.state > PF_TCPS_PROXY_DST ||
- sp->direction > PF_OUT ||
- (sp->af != AF_INET && sp->af != AF_INET6)) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -1108,7 +1108,7 @@
- break;
- }
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1136,7 +1136,7 @@
- iaa = (struct pfsync_ins_ack *)(mp->m_data + offp);
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++) {
-@@ -1152,7 +1152,7 @@
- if (ISSET(st->state_flags, PFSTATE_ACK))
- pfsync_deferred(st, 0);
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1220,7 +1220,7 @@
- sa = (struct pfsync_state *)(mp->m_data + offp);
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++) {
-@@ -1230,7 +1230,7 @@
- if (sp->timeout >= PFTM_MAX ||
- sp->src.state > PF_TCPS_PROXY_DST ||
- sp->dst.state > PF_TCPS_PROXY_DST) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -1272,7 +1272,7 @@
- }
-
- if (sfail) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -1296,7 +1296,7 @@
- st->timeout = sp->timeout;
- st->pfsync_time = time_uptime;
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1327,7 +1327,7 @@
- ua = (struct pfsync_upd_c *)(mp->m_data + offp);
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++) {
-@@ -1337,7 +1337,7 @@
- if (up->timeout >= PFTM_MAX ||
- up->src.state > PF_TCPS_PROXY_DST ||
- up->dst.state > PF_TCPS_PROXY_DST) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -1378,7 +1378,7 @@
- }
-
- if (sfail) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -1402,7 +1402,7 @@
- st->timeout = up->timeout;
- st->pfsync_time = time_uptime;
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1428,7 +1428,7 @@
- }
- ura = (struct pfsync_upd_req *)(mp->m_data + offp);
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++) {
-@@ -1451,7 +1451,7 @@
- pfsync_update_state_req(st);
- }
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
-
-@@ -1477,7 +1477,7 @@
- sa = (struct pfsync_state *)(mp->m_data + offp);
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++) {
-@@ -1494,7 +1494,7 @@
- SET(st->state_flags, PFSTATE_NOSYNC);
- pf_unlink_state(st);
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1521,7 +1521,7 @@
- sa = (struct pfsync_del_c *)(mp->m_data + offp);
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++) {
-@@ -1539,7 +1539,7 @@
- SET(st->state_flags, PFSTATE_NOSYNC);
- pf_unlink_state(st);
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1550,7 +1550,7 @@
- int
- pfsync_in_bus(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -1573,7 +1573,7 @@
-
- switch (bus->status) {
- case PFSYNC_BUS_START:
--#ifdef __FreeBSD__
-+#if 1
- callout_reset(&sc->sc_bulkfail_tmo, 4 * hz +
- V_pf_pool_limits[PF_LIMIT_STATES].limit /
- ((sc->sc_ifp->if_mtu - PFSYNC_MINPKT) /
-@@ -1585,7 +1585,7 @@
- ((sc->sc_if.if_mtu - PFSYNC_MINPKT) /
- sizeof(struct pfsync_state)));
- #endif
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
-@@ -1602,7 +1602,7 @@
- timeout_del(&sc->sc_bulkfail_tmo);
- #if NCARP > 0
- #ifdef notyet
--#ifdef __FreeBSD__
-+#if 1
- if (!sc->pfsync_sync_ok)
- #else
- if (!pfsync_sync_ok)
-@@ -1610,12 +1610,12 @@
- carp_group_demote_adj(&sc->sc_if, -1);
- #endif
- #endif
--#ifdef __FreeBSD__
-+#if 1
- sc->pfsync_sync_ok = 1;
- #else
- pfsync_sync_ok = 1;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
-@@ -1623,7 +1623,7 @@
- printf("pfsync: received valid "
- "bulk update end\n");
- } else {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
-@@ -1657,12 +1657,12 @@
- tp = (struct pfsync_tdb *)(mp->m_data + offp);
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < count; i++)
- pfsync_update_net_tdb(&tp[i]);
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1705,7 +1705,7 @@
- return;
-
- bad:
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
-@@ -1741,7 +1741,7 @@
-
- int
- pfsyncoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
--#ifdef __FreeBSD__
-+#if 1
- struct route *rt)
- #else
- struct rtentry *rt)
-@@ -1755,7 +1755,7 @@
- int
- pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
- {
--#ifndef __FreeBSD__
-+#if 0
- struct proc *p = curproc;
- #endif
- struct pfsync_softc *sc = ifp->if_softc;
-@@ -1773,7 +1773,7 @@
- case SIOCSIFDSTADDR:
- #endif
- case SIOCSIFFLAGS:
--#ifdef __FreeBSD__
-+#if 1
- if (ifp->if_flags & IFF_UP)
- ifp->if_drv_flags |= IFF_DRV_RUNNING;
- else
-@@ -1792,11 +1792,11 @@
- return (EINVAL);
- if (ifr->ifr_mtu < ifp->if_mtu) {
- s = splnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- pfsync_sendout();
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -1814,7 +1814,7 @@
- return (copyout(&pfsyncr, ifr->ifr_data, sizeof(pfsyncr)));
-
- case SIOCSETPFSYNC:
--#ifdef __FreeBSD__
-+#if 1
- if ((error = priv_check(curthread, PRIV_NETINET_PF)) != 0)
- #else
- if ((error = suser(p, p->p_acflag)) != 0)
-@@ -1823,11 +1823,11 @@
- if ((error = copyin(ifr->ifr_data, &pfsyncr, sizeof(pfsyncr))))
- return (error);
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- if (pfsyncr.pfsyncr_syncpeer.s_addr == 0)
--#ifdef __FreeBSD__
-+#if 1
- sc->sc_sync_peer.s_addr = htonl(INADDR_PFSYNC_GROUP);
- #else
- sc->sc_sync_peer.s_addr = INADDR_PFSYNC_GROUP;
-@@ -1837,19 +1837,19 @@
- pfsyncr.pfsyncr_syncpeer.s_addr;
-
- if (pfsyncr.pfsyncr_maxupdates > 255)
--#ifdef __FreeBSD__
-+#if 1
- {
- PF_UNLOCK();
- #endif
- return (EINVAL);
--#ifdef __FreeBSD__
-+#if 1
- }
- #endif
- sc->sc_maxupdates = pfsyncr.pfsyncr_maxupdates;
-
- if (pfsyncr.pfsyncr_syncdev[0] == 0) {
- sc->sc_sync_if = NULL;
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- if (imo->imo_membership)
- pfsync_multicast_cleanup(sc);
-@@ -1863,17 +1863,17 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- if ((sifp = ifunit(pfsyncr.pfsyncr_syncdev)) == NULL)
- return (EINVAL);
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- s = splnet();
--#ifdef __FreeBSD__
-+#if 1
- if (sifp->if_mtu < sc->sc_ifp->if_mtu ||
- #else
- if (sifp->if_mtu < sc->sc_if.if_mtu ||
-@@ -1884,7 +1884,7 @@
- pfsync_sendout();
- sc->sc_sync_if = sifp;
-
--#ifdef __FreeBSD__
-+#if 1
- if (imo->imo_membership) {
- PF_UNLOCK();
- pfsync_multicast_cleanup(sc);
-@@ -1897,7 +1897,7 @@
- }
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if (sc->sc_sync_if &&
- sc->sc_sync_peer.s_addr == htonl(INADDR_PFSYNC_GROUP)) {
- PF_UNLOCK();
-@@ -1938,7 +1938,7 @@
- ip->ip_hl = sizeof(sc->sc_template) >> 2;
- ip->ip_tos = IPTOS_LOWDELAY;
- /* len and id are set later */
--#ifdef __FreeBSD__
-+#if 1
- ip->ip_off = IP_DF;
- #else
- ip->ip_off = htons(IP_DF);
-@@ -1953,7 +1953,7 @@
- sc->sc_ureq_sent = time_uptime;
- #if NCARP > 0
- #ifdef notyet
--#ifdef __FreeBSD__
-+#if 1
- if (sc->pfsync_sync_ok)
- #else
- if (pfsync_sync_ok)
-@@ -1961,18 +1961,18 @@
- carp_group_demote_adj(&sc->sc_if, 1);
- #endif
- #endif
--#ifdef __FreeBSD__
-+#if 1
- sc->pfsync_sync_ok = 0;
- #else
- pfsync_sync_ok = 0;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
- #endif
- printf("pfsync: requesting bulk update\n");
--#ifdef __FreeBSD__
-+#if 1
- callout_reset(&sc->sc_bulkfail_tmo, 5 * hz,
- pfsync_bulk_fail, V_pfsyncif);
- #else
-@@ -1980,7 +1980,7 @@
- #endif
- pfsync_request_update(0, 0);
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-@@ -2066,7 +2066,7 @@
-
- TAILQ_FOREACH(st, &sc->sc_qs[q], sync_list) {
- #ifdef PFSYNC_DEBUG
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(st->sync_state == q,
- ("%s: st->sync_state == q",
- __FUNCTION__));
-@@ -2098,7 +2098,7 @@
- sc->sc_len = PFSYNC_MINPKT;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- void pfsync_sendout()
- {
- pfsync_sendout1(1);
-@@ -2115,7 +2115,7 @@
- struct pfsync_softc *sc = pfsyncif;
- #endif
- #if NBPFILTER > 0
--#ifdef __FreeBSD__
-+#if 1
- struct ifnet *ifp = sc->sc_ifp;
- #else
- struct ifnet *ifp = &sc->sc_if;
-@@ -2130,13 +2130,13 @@
- #ifdef notyet
- struct tdb *t;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- size_t pktlen;
- #endif
- int offset;
- int q, count = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #else
- splassert(IPL_NET);
-@@ -2156,7 +2156,7 @@
-
- MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- sc->sc_ifp->if_oerrors++;
- #else
- sc->sc_if.if_oerrors++;
-@@ -2166,7 +2166,7 @@
- return;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- pktlen = max_linkhdr + sc->sc_len;
- if (pktlen > MHLEN) {
- /* Find the right pool to allocate from. */
-@@ -2182,7 +2182,7 @@
- #endif
- if (!ISSET(m->m_flags, M_EXT)) {
- m_free(m);
--#ifdef __FreeBSD__
-+#if 1
- sc->sc_ifp->if_oerrors++;
- #else
- sc->sc_if.if_oerrors++;
-@@ -2200,7 +2200,7 @@
- bcopy(&sc->sc_template, ip, sizeof(*ip));
- offset = sizeof(*ip);
-
--#ifdef __FreeBSD__
-+#if 1
- ip->ip_len = m->m_pkthdr.len;
- #else
- ip->ip_len = htons(m->m_pkthdr.len);
-@@ -2214,7 +2214,7 @@
-
- ph->version = PFSYNC_VERSION;
- ph->len = htons(sc->sc_len - sizeof(*ip));
--#ifdef __FreeBSD__
-+#if 1
- bcopy(V_pf_status.pf_chksum, ph->pfcksum, PF_MD5_DIGEST_LENGTH);
- #else
- bcopy(pf_status.pf_chksum, ph->pfcksum, PF_MD5_DIGEST_LENGTH);
-@@ -2231,7 +2231,7 @@
- count = 0;
- TAILQ_FOREACH(st, &sc->sc_qs[q], sync_list) {
- #ifdef PFSYNC_DEBUG
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(st->sync_state == q,
- ("%s: st->sync_state == q",
- __FUNCTION__));
-@@ -2315,7 +2315,7 @@
- if (ifp->if_bpf) {
- m->m_data += sizeof(*ip);
- m->m_len = m->m_pkthdr.len = sc->sc_len - sizeof(*ip);
--#ifdef __FreeBSD__
-+#if 1
- BPF_MTAP(ifp, m);
- #else
- bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
-@@ -2331,7 +2331,7 @@
- }
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- sc->sc_ifp->if_opackets++;
- sc->sc_ifp->if_obytes += m->m_pkthdr.len;
- sc->sc_len = PFSYNC_MINPKT;
-@@ -2361,13 +2361,13 @@
- void
- pfsync_insert_state(struct pf_state *st)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #else
- splassert(IPL_SOFTNET);
-@@ -2383,7 +2383,7 @@
- return;
-
- #ifdef PFSYNC_DEBUG
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(st->sync_state == PFSYNC_S_NONE,
- ("%s: st->sync_state == PFSYNC_S_NONE", __FUNCTION__));
- #else
-@@ -2392,7 +2392,7 @@
- #endif
-
- if (sc->sc_len == PFSYNC_MINPKT)
--#ifdef __FreeBSD__
-+#if 1
- callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout,
- V_pfsyncif);
- #else
-@@ -2412,14 +2412,14 @@
- int
- pfsync_defer(struct pf_state *st, struct mbuf *m)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
- struct pfsync_deferral *pd;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #else
- splassert(IPL_SOFTNET);
-@@ -2433,7 +2433,7 @@
- return (0);
- sc->sc_deferred++;
-
--#ifdef __FreeBSD__
-+#if 1
- m->m_flags |= M_SKIP_FIREWALL;
- #else
- m->m_pkthdr.pf.flags |= PF_TAG_GENERATED;
-@@ -2444,7 +2444,7 @@
- pd->pd_m = m;
-
- TAILQ_INSERT_TAIL(&sc->sc_deferrals, pd, pd_entry);
--#ifdef __FreeBSD__
-+#if 1
- callout_init(&pd->pd_tmo, CALLOUT_MPSAFE);
- callout_reset(&pd->pd_tmo, defer, pfsync_defer_tmo,
- pd);
-@@ -2459,14 +2459,14 @@
- void
- pfsync_undefer(struct pfsync_deferral *pd, int drop)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
- int s;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #else
- splassert(IPL_SOFTNET);
-@@ -2481,13 +2481,13 @@
- m_freem(pd->pd_m);
- else {
- s = splnet();
--#ifdef __FreeBSD__
-+#if 1
- /* XXX: use pf_defered?! */
- PF_UNLOCK();
- #endif
- ip_output(pd->pd_m, (void *)NULL, (void *)NULL, 0,
- (void *)NULL, (void *)NULL);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- splx(s);
-@@ -2499,18 +2499,18 @@
- void
- pfsync_defer_tmo(void *arg)
- {
--#if defined(__FreeBSD__) && defined(VIMAGE)
-+#if 1 && defined(VIMAGE)
- struct pfsync_deferral *pd = arg;
- #endif
- int s;
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- CURVNET_SET(pd->pd_m->m_pkthdr.rcvif->if_vnet); /* XXX */
- PF_LOCK();
- #endif
- pfsync_undefer(arg, 0);
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- CURVNET_RESTORE();
- #endif
-@@ -2520,7 +2520,7 @@
- void
- pfsync_deferred(struct pf_state *st, int drop)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -2542,14 +2542,14 @@
- void
- pfsync_update_state(struct pf_state *st)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
- int sync = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #else
- splassert(IPL_SOFTNET);
-@@ -2567,7 +2567,7 @@
- }
-
- if (sc->sc_len == PFSYNC_MINPKT)
--#ifdef __FreeBSD__
-+#if 1
- callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout,
- V_pfsyncif);
- #else
-@@ -2608,7 +2608,7 @@
- void
- pfsync_request_update(u_int32_t creatorid, u_int64_t id)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -2636,7 +2636,7 @@
- if (TAILQ_EMPTY(&sc->sc_upd_req_list))
- nlen += sizeof(struct pfsync_subheader);
-
--#ifdef __FreeBSD__
-+#if 1
- if (sc->sc_len + nlen > sc->sc_ifp->if_mtu) {
- #else
- if (sc->sc_len + nlen > sc->sc_if.if_mtu) {
-@@ -2658,7 +2658,7 @@
- void
- pfsync_update_state_req(struct pf_state *st)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -2699,13 +2699,13 @@
- void
- pfsync_delete_state(struct pf_state *st)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #else
- splassert(IPL_SOFTNET);
-@@ -2723,7 +2723,7 @@
- }
-
- if (sc->sc_len == PFSYNC_MINPKT)
--#ifdef __FreeBSD__
-+#if 1
- callout_reset(&sc->sc_tmo, 1 * hz, pfsync_timeout,
- V_pfsyncif);
- #else
-@@ -2760,13 +2760,13 @@
- struct pfsync_clr clr;
- } __packed r;
-
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #else
- splassert(IPL_SOFTNET);
-@@ -2789,7 +2789,7 @@
- void
- pfsync_q_ins(struct pf_state *st, int q)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -2799,7 +2799,7 @@
-
- PF_LOCK_ASSERT();
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(st->sync_state == PFSYNC_S_NONE,
- ("%s: st->sync_state == PFSYNC_S_NONE", __FUNCTION__));
- #else
-@@ -2808,7 +2808,7 @@
-
- #if 1 || defined(PFSYNC_DEBUG)
- if (sc->sc_len < PFSYNC_MINPKT)
--#ifdef __FreeBSD__
-+#if 1
- panic("pfsync pkt len is too low %zu", sc->sc_len);
- #else
- panic("pfsync pkt len is too low %d", sc->sc_len);
-@@ -2817,7 +2817,7 @@
- if (TAILQ_EMPTY(&sc->sc_qs[q]))
- nlen += sizeof(struct pfsync_subheader);
-
--#ifdef __FreeBSD__
-+#if 1
- if (sc->sc_len + nlen > sc->sc_ifp->if_mtu) {
- #else
- if (sc->sc_len + nlen > sc->sc_if.if_mtu) {
-@@ -2837,14 +2837,14 @@
- void
- pfsync_q_del(struct pf_state *st)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
- int q = st->sync_state;
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(st->sync_state != PFSYNC_S_NONE,
- ("%s: st->sync_state != PFSYNC_S_NONE", __FUNCTION__));
- #else
-@@ -2863,7 +2863,7 @@
- void
- pfsync_update_tdb(struct tdb *t, int output)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -2907,7 +2907,7 @@
- void
- pfsync_delete_tdb(struct tdb *t)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -2962,20 +2962,20 @@
- void
- pfsync_bulk_start(void)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
- #endif
- printf("pfsync: received bulk update request\n");
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- if (TAILQ_EMPTY(&V_state_list))
- #else
-@@ -2985,7 +2985,7 @@
- else {
- sc->sc_ureq_received = time_uptime;
- if (sc->sc_bulk_next == NULL)
--#ifdef __FreeBSD__
-+#if 1
- sc->sc_bulk_next = TAILQ_FIRST(&V_state_list);
- #else
- sc->sc_bulk_next = TAILQ_FIRST(&state_list);
-@@ -3008,7 +3008,7 @@
- PF_LOCK_ASSERT();
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- CURVNET_SET(sc->sc_ifp->if_vnet);
- #endif
- for (;;) {
-@@ -3021,7 +3021,7 @@
-
- st = TAILQ_NEXT(st, entry_list);
- if (st == NULL)
--#ifdef __FreeBSD__
-+#if 1
- st = TAILQ_FIRST(&V_state_list);
- #else
- st = TAILQ_FIRST(&state_list);
-@@ -3035,7 +3035,7 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (i > 1 && (sc->sc_ifp->if_mtu - sc->sc_len) <
- #else
- if (i > 1 && (sc->sc_if.if_mtu - sc->sc_len) <
-@@ -3043,7 +3043,7 @@
- sizeof(struct pfsync_state)) {
- /* we've filled a packet */
- sc->sc_bulk_next = st;
--#ifdef __FreeBSD__
-+#if 1
- callout_reset(&sc->sc_bulk_tmo, 1,
- pfsync_bulk_update, sc);
- #else
-@@ -3053,7 +3053,7 @@
- }
- }
-
--#ifdef __FreeBSD__
-+#if 1
- CURVNET_RESTORE();
- #endif
- splx(s);
-@@ -3067,7 +3067,7 @@
- struct pfsync_bus bus;
- } __packed r;
-
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -3080,7 +3080,7 @@
- r.subh.action = PFSYNC_ACT_BUS;
- r.subh.count = htons(1);
-
--#ifdef __FreeBSD__
-+#if 1
- r.bus.creatorid = V_pf_status.hostid;
- #else
- r.bus.creatorid = pf_status.hostid;
-@@ -3096,13 +3096,13 @@
- {
- struct pfsync_softc *sc = arg;
-
--#ifdef __FreeBSD__
-+#if 1
- CURVNET_SET(sc->sc_ifp->if_vnet);
- #endif
-
- if (sc->sc_bulk_tries++ < PFSYNC_MAX_BULKTRIES) {
- /* Try again */
--#ifdef __FreeBSD__
-+#if 1
- callout_reset(&sc->sc_bulkfail_tmo, 5 * hz,
- pfsync_bulk_fail, V_pfsyncif);
- #else
-@@ -3117,7 +3117,7 @@
- sc->sc_bulk_tries = 0;
- #if NCARP > 0
- #ifdef notyet
--#ifdef __FreeBSD__
-+#if 1
- if (!sc->pfsync_sync_ok)
- #else
- if (!pfsync_sync_ok)
-@@ -3125,12 +3125,12 @@
- carp_group_demote_adj(&sc->sc_if, -1);
- #endif
- #endif
--#ifdef __FreeBSD__
-+#if 1
- sc->pfsync_sync_ok = 1;
- #else
- pfsync_sync_ok = 1;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
-@@ -3138,7 +3138,7 @@
- printf("pfsync: failed to receive bulk update\n");
- }
-
--#ifdef __FreeBSD__
-+#if 1
- CURVNET_RESTORE();
- #endif
- }
-@@ -3146,7 +3146,7 @@
- void
- pfsync_send_plus(void *plus, size_t pluslen)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -3155,7 +3155,7 @@
-
- PF_LOCK_ASSERT();
-
--#ifdef __FreeBSD__
-+#if 1
- if (sc->sc_len + pluslen > sc->sc_ifp->if_mtu) {
- #else
- if (sc->sc_len + pluslen > sc->sc_if.if_mtu) {
-@@ -3176,13 +3176,13 @@
- int
- pfsync_up(void)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if (sc == NULL || !ISSET(sc->sc_ifp->if_flags, IFF_DRV_RUNNING))
- #else
- if (sc == NULL || !ISSET(sc->sc_if.if_flags, IFF_RUNNING))
-@@ -3195,7 +3195,7 @@
- int
- pfsync_state_in_use(struct pf_state *st)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfsync_softc *sc = V_pfsyncif;
- #else
- struct pfsync_softc *sc = pfsyncif;
-@@ -3218,35 +3218,35 @@
- void
- pfsync_timeout(void *arg)
- {
--#if defined(__FreeBSD__) && defined(VIMAGE)
-+#if 1 && defined(VIMAGE)
- struct pfsync_softc *sc = arg;
- #endif
- int s;
-
--#ifdef __FreeBSD__
-+#if 1
- CURVNET_SET(sc->sc_ifp->if_vnet);
- #endif
-
- pfsync_tmos++;
-
- s = splnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- pfsync_sendout();
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- splx(s);
-
--#ifdef __FreeBSD__
-+#if 1
- CURVNET_RESTORE();
- #endif
- }
-
- /* this is a softnet/netisr handler */
- void
--#ifdef __FreeBSD__
-+#if 1
- pfsyncintr(void *arg)
- {
- struct pfsync_softc *sc = arg;
-@@ -3307,7 +3307,7 @@
- return (ENOPROTOOPT);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- static int
- pfsync_multicast_setup(struct pfsync_softc *sc)
- {
---- a/src/sys/contrib/pf/net/if_pfsync.h
-+++ b/src/sys/contrib/pf/net/if_pfsync.h
-@@ -268,7 +268,7 @@
- int pfsyncr_authlevel;
- };
-
--#ifdef __FreeBSD__
-+#if 1
- #define SIOCSETPFSYNC _IOW('i', 247, struct ifreq)
- #define SIOCGETPFSYNC _IOWR('i', 248, struct ifreq)
- #endif
-@@ -288,7 +288,7 @@
- #define PFSYNC_S_DEFER 0xfe
- #define PFSYNC_S_NONE 0xff
-
--#ifdef __FreeBSD__
-+#if 1
- void pfsync_input(struct mbuf *, __unused int);
- #else
- void pfsync_input(struct mbuf *, ...);
-@@ -300,7 +300,7 @@
- #define PFSYNC_SI_CKSUM 0x02
- #define PFSYNC_SI_ACK 0x04
- int pfsync_state_import(struct pfsync_state *, u_int8_t);
--#ifndef __FreeBSD__
-+#if 0
- void pfsync_state_export(struct pfsync_state *,
- struct pf_state *);
- #endif
---- a/src/sys/contrib/pf/net/pf.c
-+++ b/src/sys/contrib/pf/net/pf.c
-@@ -35,7 +35,7 @@
- *
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #include "opt_inet.h"
- #include "opt_inet6.h"
-
-@@ -43,7 +43,7 @@
- __FBSDID("$FreeBSD$");
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #include "opt_bpf.h"
- #include "opt_pf.h"
-
-@@ -70,7 +70,7 @@
- #include <sys/socketvar.h>
- #include <sys/kernel.h>
- #include <sys/time.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/random.h>
- #include <sys/sysctl.h>
- #include <sys/endian.h>
-@@ -79,7 +79,7 @@
- #include <sys/pool.h>
- #endif
- #include <sys/proc.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/kthread.h>
- #include <sys/lock.h>
- #include <sys/sx.h>
-@@ -87,7 +87,7 @@
- #include <sys/rwlock.h>
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/md5.h>
- #else
- #include <crypto/md5.h>
-@@ -97,7 +97,7 @@
- #include <net/if_types.h>
- #include <net/bpf.h>
- #include <net/route.h>
--#ifdef __FreeBSD__
-+#if 1
- #ifdef RADIX_MPATH
- #include <net/radix_mpath.h>
- #endif
-@@ -120,12 +120,12 @@
- #include <netinet/udp_var.h>
- #include <netinet/icmp_var.h>
- #include <netinet/if_ether.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <netinet/ip_fw.h>
- #include <netpfil/ipfw/ip_fw_private.h> /* XXX: only for DIR_IN/DIR_OUT */
- #endif
-
--#ifndef __FreeBSD__
-+#if 0
- #include <dev/rndvar.h>
- #endif
- #include <net/pfvar.h>
-@@ -138,13 +138,13 @@
- #include <netinet/in_pcb.h>
- #include <netinet/icmp6.h>
- #include <netinet6/nd6.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <netinet6/ip6_var.h>
- #include <netinet6/in6_pcb.h>
- #endif
- #endif /* INET6 */
-
--#ifdef __FreeBSD__
-+#if 1
- #include <machine/in_cksum.h>
- #include <sys/limits.h>
- #include <sys/ucred.h>
-@@ -153,7 +153,7 @@
- extern int ip_optcopy(struct ip *, struct ip *);
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x
- #else
- #define DPFPRINTF(n, x) if (pf_status.debug >= (n)) printf x
-@@ -164,7 +164,7 @@
- */
-
- /* state tables */
--#ifdef __FreeBSD__
-+#if 1
- VNET_DEFINE(struct pf_state_tree, pf_statetbl);
-
- VNET_DEFINE(struct pf_altqqueue, pf_altqs[2]);
-@@ -252,7 +252,7 @@
- struct pf_addr *, struct pf_addr *, u_int16_t,
- u_int16_t *, u_int16_t *, u_int16_t *,
- u_int16_t *, u_int8_t, sa_family_t);
--#ifdef __FreeBSD__
-+#if 1
- void pf_send_tcp(struct mbuf *,
- const struct pf_rule *, sa_family_t,
- #else
-@@ -270,7 +270,7 @@
- int pf_test_rule(struct pf_rule **, struct pf_state **,
- int, struct pfi_kif *, struct mbuf *, int,
- void *, struct pf_pdesc *, struct pf_rule **,
--#ifdef __FreeBSD__
-+#if 1
- struct pf_ruleset **, struct ifqueue *,
- struct inpcb *);
- #else
-@@ -312,7 +312,7 @@
- void pf_route6(struct mbuf **, struct pf_rule *, int,
- struct ifnet *, struct pf_state *,
- struct pf_pdesc *);
--#ifndef __FreeBSD__
-+#if 0
- int pf_socket_lookup(int, struct pf_pdesc *);
- #endif
- u_int8_t pf_get_wscale(struct mbuf *, int, u_int16_t,
-@@ -325,7 +325,7 @@
- struct pf_addr *);
- int pf_check_proto_cksum(struct mbuf *, int, int,
- u_int8_t, sa_family_t);
--#ifndef __FreeBSD__
-+#if 0
- struct pf_divert *pf_get_divert(struct mbuf *);
- #endif
- void pf_print_state_parts(struct pf_state *,
-@@ -334,7 +334,7 @@
- struct pf_addr_wrap *);
- int pf_compare_state_keys(struct pf_state_key *,
- struct pf_state_key *, struct pfi_kif *, u_int);
--#ifdef __FreeBSD__
-+#if 1
- struct pf_state *pf_find_state(struct pfi_kif *,
- struct pf_state_key_cmp *, u_int, struct mbuf *,
- struct pf_mtag *);
-@@ -345,7 +345,7 @@
- int pf_src_connlimit(struct pf_state **);
- int pf_check_congestion(struct ifqueue *);
-
--#ifdef __FreeBSD__
-+#if 1
- int in4_cksum(struct mbuf *m, u_int8_t nxt, int off, int len);
-
- VNET_DECLARE(int, pf_end_threads);
-@@ -364,7 +364,7 @@
- };
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #define PPACKET_LOOPED() \
- (pd->pf_mtag->flags & PF_PACKET_LOOPED)
-
-@@ -404,7 +404,7 @@
- } while (0)
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #define BOUND_IFACE(r, k) \
- ((r)->rule_flag & PFRULE_IFBOUND) ? (k) : V_pfi_all
- #else
-@@ -441,7 +441,7 @@
- static __inline int pf_state_compare_id(struct pf_state *,
- struct pf_state *);
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DEFINE(struct pf_src_tree, tree_src_tracking);
-
- VNET_DEFINE(struct pf_state_tree_id, tree_id);
-@@ -564,7 +564,7 @@
- if ((*state)->rule.ptr->max_src_conn &&
- (*state)->rule.ptr->max_src_conn <
- (*state)->src_node->conn) {
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.lcounters[LCNT_SRCCONN]++;
- #else
- pf_status.lcounters[LCNT_SRCCONN]++;
-@@ -574,7 +574,7 @@
-
- if ((*state)->rule.ptr->max_src_conn_rate.limit &&
- pf_check_threshold(&(*state)->src_node->conn_rate)) {
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.lcounters[LCNT_SRCCONNRATE]++;
- #else
- pf_status.lcounters[LCNT_SRCCONNRATE]++;
-@@ -589,7 +589,7 @@
- struct pfr_addr p;
- u_int32_t killed = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.lcounters[LCNT_OVERLOAD_TABLE]++;
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
-@@ -626,7 +626,7 @@
- struct pf_state_key *sk;
- struct pf_state *st;
-
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.lcounters[LCNT_OVERLOAD_FLUSH]++;
- RB_FOREACH(st, pf_state_tree_id, &V_tree_id) {
- #else
-@@ -656,14 +656,14 @@
- killed++;
+@@ -2217,7 +2217,7 @@
}
+ free($9.queues.pqname);
}
-#ifdef __FreeBSD__
+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
+ r.divert.port = $9.divert.port;
#else
- if (pf_status.debug >= PF_DEBUG_MISC)
- #endif
- printf(", %u states killed", killed);
+ if ((r.divert.port = $9.divert.port)) {
+@@ -2362,7 +2362,7 @@
+ filter_opts.rtableid = $2;
}
+ | DIVERTTO portplain {
-#ifdef __FreeBSD__
+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC)
- #else
- if (pf_status.debug >= PF_DEBUG_MISC)
-@@ -691,7 +691,7 @@
- k.rule.ptr = rule;
- else
- k.rule.ptr = NULL;
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.scounters[SCNT_SRC_NODE_SEARCH]++;
- *sn = RB_FIND(pf_src_tree, &V_tree_src_tracking, &k);
- #else
-@@ -702,13 +702,13 @@
- if (*sn == NULL) {
- if (!rule->max_src_nodes ||
- rule->src_nodes < rule->max_src_nodes)
--#ifdef __FreeBSD__
-+#if 1
- (*sn) = pool_get(&V_pf_src_tree_pl, PR_NOWAIT | PR_ZERO);
- #else
- (*sn) = pool_get(&pf_src_tree_pl, PR_NOWAIT | PR_ZERO);
+ filter_opts.divert.port = $2.a;
+ if (!filter_opts.divert.port) {
+ yyerror("invalid divert port: %u", ntohs($2.a));
+@@ -2371,7 +2371,7 @@
#endif
- else
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.lcounters[LCNT_SRCNODES]++;
- #else
- pf_status.lcounters[LCNT_SRCNODES]++;
-@@ -728,7 +728,7 @@
- (*sn)->rule.ptr = NULL;
- PF_ACPY(&(*sn)->addr, src, af);
- if (RB_INSERT(pf_src_tree,
--#ifdef __FreeBSD__
-+#if 1
- &V_tree_src_tracking, *sn) != NULL) {
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
-@@ -739,7 +739,7 @@
- pf_print_host(&(*sn)->addr, 0, af);
- printf("\n");
- }
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_src_tree_pl, *sn);
- #else
- pool_put(&pf_src_tree_pl, *sn);
-@@ -750,7 +750,7 @@
- (*sn)->ruletype = rule->action;
- if ((*sn)->rule.ptr != NULL)
- (*sn)->rule.ptr->src_nodes++;
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.scounters[SCNT_SRC_NODE_INSERT]++;
- V_pf_status.src_nodes++;
- #else
-@@ -760,7 +760,7 @@
- } else {
- if (rule->max_src_states &&
- (*sn)->states >= rule->max_src_states) {
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.lcounters[LCNT_SRCSTATES]++;
- #else
- pf_status.lcounters[LCNT_SRCSTATES]++;
-@@ -863,13 +863,13 @@
- struct pf_state_key *cur;
- struct pf_state *olds = NULL;
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(s->key[idx] == NULL, ("%s: key is null!", __FUNCTION__));
- #else
- KASSERT(s->key[idx] == NULL); /* XXX handle this? */
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if ((cur = RB_INSERT(pf_state_tree, &V_pf_statetbl, sk)) != NULL) {
- #else
- if ((cur = RB_INSERT(pf_state_tree, &pf_statetbl, sk)) != NULL) {
-@@ -886,7 +886,7 @@
- /* unlink late or sks can go away */
- olds = si->s;
- } else {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -909,7 +909,7 @@
- sk : NULL);
- printf("\n");
- }
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_key_pl, sk);
- #else
- pool_put(&pf_state_key_pl, sk);
-@@ -917,7 +917,7 @@
- return (-1); /* collision! */
- }
- }
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_key_pl, sk);
- #else
- pool_put(&pf_state_key_pl, sk);
-@@ -926,7 +926,7 @@
- } else
- s->key[idx] = sk;
-
--#ifdef __FreeBSD__
-+#if 1
- if ((si = pool_get(&V_pf_state_item_pl, PR_NOWAIT)) == NULL) {
- #else
- if ((si = pool_get(&pf_state_item_pl, PR_NOWAIT)) == NULL) {
-@@ -937,7 +937,7 @@
- si->s = s;
-
- /* list is sorted, if-bound states before floating */
--#ifdef __FreeBSD__
-+#if 1
- if (s->kif == V_pfi_all)
- #else
- if (s->kif == pfi_all)
-@@ -976,7 +976,7 @@
-
- if (si) {
- TAILQ_REMOVE(&s->key[idx]->states, si, entry);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_item_pl, si);
- #else
- pool_put(&pf_state_item_pl, si);
-@@ -984,20 +984,20 @@
- }
-
- if (TAILQ_EMPTY(&s->key[idx]->states)) {
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_state_tree, &V_pf_statetbl, s->key[idx]);
- #else
- RB_REMOVE(pf_state_tree, &pf_statetbl, s->key[idx]);
- #endif
- if (s->key[idx]->reverse)
- s->key[idx]->reverse->reverse = NULL;
--#ifdef __FreeBSD__
-+#if 1
- /* XXX: implement this */
- #else
- if (s->key[idx]->inp)
- s->key[idx]->inp->inp_pf_sk = NULL;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_key_pl, s->key[idx]);
- #else
- pool_put(&pf_state_key_pl, s->key[idx]);
-@@ -1011,7 +1011,7 @@
- {
- struct pf_state_key *sk;
-
--#ifdef __FreeBSD__
-+#if 1
- if ((sk = pool_get(&V_pf_state_key_pl, pool_flags)) == NULL)
- #else
- if ((sk = pool_get(&pf_state_key_pl, pool_flags)) == NULL)
-@@ -1029,7 +1029,7 @@
- struct pf_addr *saddr, struct pf_addr *daddr,
- u_int16_t sport, u_int16_t dport)
- {
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((*skp == NULL && *nkp == NULL),
- ("%s: skp == NULL && nkp == NULL", __FUNCTION__));
- #else
-@@ -1075,7 +1075,7 @@
- pf_state_insert(struct pfi_kif *kif, struct pf_state_key *skw,
- struct pf_state_key *sks, struct pf_state *s)
- {
--#ifndef __FreeBSD__
-+#if 0
- splassert(IPL_SOFTNET);
- #endif
-
-@@ -1087,7 +1087,7 @@
- s->key[PF_SK_STACK] = s->key[PF_SK_WIRE];
- } else {
- if (pf_state_key_attach(skw, s, PF_SK_WIRE)) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_key_pl, sks);
- #else
- pool_put(&pf_state_key_pl, sks);
-@@ -1101,7 +1101,7 @@
- }
-
- if (s->id == 0 && s->creatorid == 0) {
--#ifdef __FreeBSD__
-+#if 1
- s->id = htobe64(V_pf_status.stateid++);
- s->creatorid = V_pf_status.hostid;
- #else
-@@ -1109,7 +1109,7 @@
- s->creatorid = pf_status.hostid;
- #endif
- }
--#ifdef __FreeBSD__
-+#if 1
- if (RB_INSERT(pf_state_tree_id, &V_tree_id, s) != NULL) {
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
-@@ -1118,7 +1118,7 @@
- #endif
- printf("pf: state insert failed: "
- "id: %016llx creatorid: %08x",
--#ifdef __FreeBSD__
-+#if 1
- (unsigned long long)betoh64(s->id), ntohl(s->creatorid));
- #else
- betoh64(s->id), ntohl(s->creatorid));
-@@ -1128,7 +1128,7 @@
- pf_detach_state(s);
- return (-1);
- }
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_INSERT_TAIL(&V_state_list, s, entry_list);
- V_pf_status.fcounters[FCNT_STATE_INSERT]++;
- V_pf_status.states++;
-@@ -1139,7 +1139,7 @@
- #endif
- pfi_kif_ref(kif, PFI_KIF_REF_STATE);
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_insert_state_ptr != NULL)
- pfsync_insert_state_ptr(s);
- #else
-@@ -1152,7 +1152,7 @@
- struct pf_state *
- pf_find_state_byid(struct pf_state_cmp *key)
- {
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.fcounters[FCNT_STATE_SEARCH]++;
-
- return (RB_FIND(pf_state_tree_id, &V_tree_id, (struct pf_state *)key));
-@@ -1195,7 +1195,7 @@
- }
-
- struct pf_state *
--#ifdef __FreeBSD__
-+#if 1
- pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir,
- struct mbuf *m, struct pf_mtag *pftag)
- #else
-@@ -1206,18 +1206,18 @@
- struct pf_state_key *sk;
- struct pf_state_item *si;
-
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.fcounters[FCNT_STATE_SEARCH]++;
- #else
- pf_status.fcounters[FCNT_STATE_SEARCH]++;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if (dir == PF_OUT && pftag->statekey &&
- ((struct pf_state_key *)pftag->statekey)->reverse)
- sk = ((struct pf_state_key *)pftag->statekey)->reverse;
- else {
--#ifdef __FreeBSD__
-+#if 1
- if ((sk = RB_FIND(pf_state_tree, &V_pf_statetbl,
- #else
- if ((sk = RB_FIND(pf_state_tree, &pf_statetbl,
-@@ -1237,7 +1237,7 @@
- ((struct pf_state_key *)m->m_pkthdr.pf.statekey)->reverse)
- sk = ((struct pf_state_key *)m->m_pkthdr.pf.statekey)->reverse;
- else {
--#ifdef __FreeBSD__
-+#if 1
- if ((sk = RB_FIND(pf_state_tree, &V_pf_statetbl,
- #else
- if ((sk = RB_FIND(pf_state_tree, &pf_statetbl,
-@@ -1255,7 +1255,7 @@
- #endif
-
- if (dir == PF_OUT)
--#ifdef __FreeBSD__
-+#if 1
- pftag->statekey = NULL;
- #else
- m->m_pkthdr.pf.statekey = NULL;
-@@ -1263,7 +1263,7 @@
-
- /* list is sorted, if-bound states before floating ones */
- TAILQ_FOREACH(si, &sk->states, entry)
--#ifdef __FreeBSD__
-+#if 1
- if ((si->s->kif == V_pfi_all || si->s->kif == kif) &&
- #else
- if ((si->s->kif == pfi_all || si->s->kif == kif) &&
-@@ -1281,13 +1281,13 @@
- struct pf_state_key *sk;
- struct pf_state_item *si, *ret = NULL;
-
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.fcounters[FCNT_STATE_SEARCH]++;
- #else
- pf_status.fcounters[FCNT_STATE_SEARCH]++;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- sk = RB_FIND(pf_state_tree, &V_pf_statetbl, (struct pf_state_key *)key);
- #else
- sk = RB_FIND(pf_state_tree, &pf_statetbl, (struct pf_state_key *)key);
-@@ -1316,7 +1316,7 @@
- pf_purge_thread(void *v)
- {
- int nloops = 0, s;
--#ifdef __FreeBSD__
-+#if 1
- int locked;
- #endif
-
-@@ -1325,7 +1325,7 @@
- for (;;) {
- tsleep(pf_purge_thread, PWAIT, "pftm", 1 * hz);
-
--#ifdef __FreeBSD__
-+#if 1
- sx_slock(&V_pf_consistency_lock);
- PF_LOCK();
- locked = 0;
-@@ -1350,7 +1350,7 @@
- s = splsoftnet();
-
- /* process a fraction of the state table every second */
--#ifdef __FreeBSD__
-+#if 1
- if (!pf_purge_expired_states(1 + (V_pf_status.states /
- V_pf_default_rule.timeout[PFTM_INTERVAL]), 0)) {
- PF_UNLOCK();
-@@ -1368,7 +1368,7 @@
- #endif
-
- /* purge other expired types every PFTM_INTERVAL seconds */
--#ifdef __FreeBSD__
-+#if 1
- if (++nloops >= V_pf_default_rule.timeout[PFTM_INTERVAL]) {
- #else
- if (++nloops >= pf_default_rule.timeout[PFTM_INTERVAL]) {
-@@ -1379,7 +1379,7 @@
}
-
- splx(s);
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- if (locked)
- sx_xunlock(&V_pf_consistency_lock);
-@@ -1403,7 +1403,7 @@
- return (time_second);
- if (state->timeout == PFTM_UNTIL_PACKET)
- return (0);
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(state->timeout != PFTM_UNLINKED,
- ("pf_state_expires: timeout == PFTM_UNLINKED"));
- KASSERT((state->timeout < PFTM_MAX),
-@@ -1414,7 +1414,7 @@
- #endif
- timeout = state->rule.ptr->timeout[state->timeout];
- if (!timeout)
--#ifdef __FreeBSD__
-+#if 1
- timeout = V_pf_default_rule.timeout[state->timeout];
- #else
- timeout = pf_default_rule.timeout[state->timeout];
-@@ -1424,7 +1424,7 @@
- end = state->rule.ptr->timeout[PFTM_ADAPTIVE_END];
- states = state->rule.ptr->states_cur;
- } else {
--#ifdef __FreeBSD__
-+#if 1
- start = V_pf_default_rule.timeout[PFTM_ADAPTIVE_START];
- end = V_pf_default_rule.timeout[PFTM_ADAPTIVE_END];
- states = V_pf_status.states;
-@@ -1444,7 +1444,7 @@
- return (state->expire + timeout);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- int
- pf_purge_expired_src_nodes(int waslocked)
- #else
-@@ -1455,7 +1455,7 @@
- struct pf_src_node *cur, *next;
- int locked = waslocked;
-
--#ifdef __FreeBSD__
-+#if 1
- for (cur = RB_MIN(pf_src_tree, &V_tree_src_tracking); cur; cur = next) {
- next = RB_NEXT(pf_src_tree, &V_tree_src_tracking, cur);
- #else
-@@ -1465,14 +1465,14 @@
-
- if (cur->states <= 0 && cur->expire <= time_second) {
- if (! locked) {
--#ifdef __FreeBSD__
-+#if 1
- if (!sx_try_upgrade(&V_pf_consistency_lock))
- return (0);
- #else
- rw_enter_write(&pf_consistency_lock);
- #endif
- next = RB_NEXT(pf_src_tree,
--#ifdef __FreeBSD__
-+#if 1
- &V_tree_src_tracking, cur);
- #else
- &tree_src_tracking, cur);
-@@ -1485,7 +1485,7 @@
- cur->rule.ptr->max_src_nodes <= 0)
- pf_rm_rule(NULL, cur->rule.ptr);
- }
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_src_tree, &V_tree_src_tracking, cur);
- V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS]++;
- V_pf_status.src_nodes--;
-@@ -1500,7 +1500,7 @@
- }
-
- if (locked && !waslocked)
--#ifdef __FreeBSD__
-+#if 1
- {
- sx_downgrade(&V_pf_consistency_lock);
- }
-@@ -1522,7 +1522,7 @@
- timeout = s->rule.ptr->timeout[PFTM_SRC_NODE];
- if (!timeout)
- timeout =
--#ifdef __FreeBSD__
-+#if 1
- V_pf_default_rule.timeout[PFTM_SRC_NODE];
- #else
- pf_default_rule.timeout[PFTM_SRC_NODE];
-@@ -1535,7 +1535,7 @@
- timeout = s->rule.ptr->timeout[PFTM_SRC_NODE];
- if (!timeout)
- timeout =
--#ifdef __FreeBSD__
-+#if 1
- V_pf_default_rule.timeout[PFTM_SRC_NODE];
- #else
- pf_default_rule.timeout[PFTM_SRC_NODE];
-@@ -1550,7 +1550,7 @@
- void
- pf_unlink_state(struct pf_state *cur)
- {
--#ifdef __FreeBSD__
-+#if 1
- if (cur->local_flags & PFSTATE_EXPIRING)
- return;
- cur->local_flags |= PFSTATE_EXPIRING;
-@@ -1560,7 +1560,7 @@
-
- if (cur->src.state == PF_TCPS_PROXY_DST) {
- /* XXX wire key the right one? */
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(NULL, cur->rule.ptr, cur->key[PF_SK_WIRE]->af,
- #else
- pf_send_tcp(cur->rule.ptr, cur->key[PF_SK_WIRE]->af,
-@@ -1572,14 +1572,14 @@
- cur->src.seqhi, cur->src.seqlo + 1,
- TH_RST|TH_ACK, 0, 0, 0, 1, cur->tag, NULL, NULL);
- }
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_state_tree_id, &V_tree_id, cur);
- #else
- RB_REMOVE(pf_state_tree_id, &tree_id, cur);
- #endif
- #if NPFLOW > 0
- if (cur->state_flags & PFSTATE_PFLOW)
--#ifdef __FreeBSD__
-+#if 1
- if (export_pflow_ptr != NULL)
- export_pflow_ptr(cur);
- #else
-@@ -1587,7 +1587,7 @@
- #endif
- #endif
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_delete_state_ptr != NULL)
- pfsync_delete_state_ptr(cur);
- #else
-@@ -1604,12 +1604,12 @@
- void
- pf_free_state(struct pf_state *cur)
- {
+ | DIVERTTO STRING PORT portplain {
-#ifndef __FreeBSD__
+#if 0
- splassert(IPL_SOFTNET);
- #endif
-
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_state_in_use_ptr != NULL &&
- pfsync_state_in_use_ptr(cur))
- #else
-@@ -1617,7 +1617,7 @@
- #endif
- return;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(cur->timeout == PFTM_UNLINKED,
- ("pf_free_state: cur->timeout != PFTM_UNLINKED"));
- #else
-@@ -1635,14 +1635,14 @@
- pf_rm_rule(NULL, cur->anchor.ptr);
- pf_normalize_tcp_cleanup(cur);
- pfi_kif_unref(cur->kif, PFI_KIF_REF_STATE);
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_REMOVE(&V_state_list, cur, entry_list);
- #else
- TAILQ_REMOVE(&state_list, cur, entry_list);
- #endif
- if (cur->tag)
- pf_tag_unref(cur->tag);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_pl, cur);
- V_pf_status.fcounters[FCNT_STATE_REMOVALS]++;
- V_pf_status.states--;
-@@ -1653,7 +1653,7 @@
- #endif
- }
-
--#ifdef __FreeBSD__
-+#if 1
- int
- pf_purge_expired_states(u_int32_t maxcheck, int waslocked)
- #else
-@@ -1663,7 +1663,7 @@
- {
- static struct pf_state *cur = NULL;
- struct pf_state *next;
--#ifdef __FreeBSD__
-+#if 1
- int locked = waslocked;
- #else
- int locked = 0;
-@@ -1672,7 +1672,7 @@
- while (maxcheck--) {
- /* wrap to start of list when we hit the end */
- if (cur == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- cur = TAILQ_FIRST(&V_state_list);
- #else
- cur = TAILQ_FIRST(&state_list);
-@@ -1687,7 +1687,7 @@
- if (cur->timeout == PFTM_UNLINKED) {
- /* free unlinked state */
- if (! locked) {
--#ifdef __FreeBSD__
-+#if 1
- if (!sx_try_upgrade(&V_pf_consistency_lock))
- return (0);
- #else
-@@ -1700,7 +1700,7 @@
- /* unlink and free expired state */
- pf_unlink_state(cur);
- if (! locked) {
--#ifdef __FreeBSD__
-+#if 1
- if (!sx_try_upgrade(&V_pf_consistency_lock))
- return (0);
- #else
-@@ -1713,7 +1713,7 @@
- cur = next;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (!waslocked && locked)
- sx_downgrade(&V_pf_consistency_lock);
-
-@@ -2200,7 +2200,7 @@
- struct tcphdr *th, struct pf_state_peer *dst)
- {
- int hlen = (th->th_off << 2) - sizeof(*th), thoptlen = hlen;
--#ifdef __FreeBSD__
-+#if 1
- u_int8_t opts[TCP_MAXOLEN], *opt = opts;
- #else
- u_int8_t opts[MAX_TCPOPTLEN], *opt = opts;
-@@ -2248,7 +2248,7 @@
- }
-
- if (copyback)
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off + sizeof(*th), thoptlen, (caddr_t)opts);
- #else
- m_copyback(m, off + sizeof(*th), thoptlen, opts);
-@@ -2257,7 +2257,7 @@
- }
-
- void
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(struct mbuf *replyto, const struct pf_rule *r, sa_family_t af,
- #else
- pf_send_tcp(const struct pf_rule *r, sa_family_t af,
-@@ -2277,7 +2277,7 @@
- #endif /* INET6 */
- struct tcphdr *th;
- char *opt;
--#ifdef __FreeBSD__
-+#if 1
- struct pf_mtag *pf_mtag;
-
- KASSERT(
-@@ -2325,7 +2325,7 @@
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
- if (m == NULL)
- return;
--#ifdef __FreeBSD__
-+#if 1
- #ifdef MAC
- mac_netinet_firewall_send(m);
- #endif
-@@ -2335,7 +2335,7 @@
- }
- #endif
- if (tag)
--#ifdef __FreeBSD__
-+#if 1
- m->m_flags |= M_SKIP_FIREWALL;
- pf_mtag->tag = rtag;
- #else
-@@ -2344,20 +2344,20 @@
- #endif
-
- if (r != NULL && r->rtableid >= 0)
--#ifdef __FreeBSD__
-+#if 1
- {
- M_SETFIB(m, r->rtableid);
- pf_mtag->rtableid = r->rtableid;
- #else
- m->m_pkthdr.pf.rtableid = r->rtableid;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- }
- #endif
-
- #ifdef ALTQ
- if (r != NULL && r->qid) {
--#ifdef __FreeBSD__
-+#if 1
- pf_mtag->qid = r->qid;
-
- /* add hints for ecn */
-@@ -2429,7 +2429,7 @@
- h->ip_v = 4;
- h->ip_hl = sizeof(*h) >> 2;
- h->ip_tos = IPTOS_LOWDELAY;
--#ifdef __FreeBSD__
-+#if 1
- h->ip_off = V_path_mtu_discovery ? IP_DF : 0;
- h->ip_len = len;
- h->ip_ttl = ttl ? ttl : V_ip_defttl;
-@@ -2440,7 +2440,7 @@
- #endif
- h->ip_sum = 0;
- if (eh == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- ip_output(m, (void *)NULL, (void *)NULL, 0,
- (void *)NULL, (void *)NULL);
-@@ -2465,7 +2465,7 @@
- bcopy(eh->ether_dhost, e->ether_shost, ETHER_ADDR_LEN);
- bcopy(eh->ether_shost, e->ether_dhost, ETHER_ADDR_LEN);
- e->ether_type = eh->ether_type;
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- /* XXX_IMPORT: later */
- ip_output(m, (void *)NULL, &ro, 0,
-@@ -2487,7 +2487,7 @@
- h6->ip6_vfc |= IPV6_VERSION;
- h6->ip6_hlim = IPV6_DEFHLIM;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL);
- PF_LOCK();
-@@ -2504,14 +2504,14 @@
- struct pf_rule *r)
- {
- struct mbuf *m0;
--#ifdef __FreeBSD__
-+#if 1
- #ifdef INET
- struct ip *ip;
- #endif
- struct pf_mtag *pf_mtag;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- m0 = m_copypacket(m, M_DONTWAIT);
- if (m0 == NULL)
- return;
-@@ -2520,7 +2520,7 @@
- return;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if ((pf_mtag = pf_get_mtag(m0)) == NULL)
- return;
- /* XXX: revisit */
-@@ -2530,20 +2530,20 @@
- #endif
-
- if (r->rtableid >= 0)
--#ifdef __FreeBSD__
-+#if 1
- {
- M_SETFIB(m0, r->rtableid);
- pf_mtag->rtableid = r->rtableid;
- #else
- m0->m_pkthdr.pf.rtableid = r->rtableid;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- }
- #endif
-
- #ifdef ALTQ
- if (r->qid) {
--#ifdef __FreeBSD__
-+#if 1
- pf_mtag->qid = r->qid;
- /* add hints for ecn */
- pf_mtag->hdr = mtod(m0, struct ip *);
-@@ -2558,7 +2558,7 @@
- switch (af) {
- #ifdef INET
- case AF_INET:
--#ifdef __FreeBSD__
-+#if 1
- /* icmp_error() expects host byte ordering */
- ip = mtod(m0, struct ip *);
- NTOHS(ip->ip_len);
-@@ -2573,11 +2573,11 @@
- #endif /* INET */
- #ifdef INET6
- case AF_INET6:
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- icmp6_error(m0, type, code, 0);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- break;
-@@ -2721,7 +2721,7 @@
- }
-
- int
--#ifdef __FreeBSD__
-+#if 1
- pf_match_tag(struct mbuf *m, struct pf_rule *r, int *tag,
- struct pf_mtag *pf_mtag)
- #else
-@@ -2729,7 +2729,7 @@
- #endif
- {
- if (*tag == -1)
--#ifdef __FreeBSD__
-+#if 1
- *tag = pf_mtag->tag;
- #else
- *tag = m->m_pkthdr.pf.tag;
-@@ -2740,7 +2740,7 @@
- }
-
- int
--#ifdef __FreeBSD__
-+#if 1
- pf_tag_packet(struct mbuf *m, int tag, int rtableid,
- struct pf_mtag *pf_mtag)
- #else
-@@ -2751,13 +2751,13 @@
- return (0);
-
- if (tag > 0)
--#ifdef __FreeBSD__
-+#if 1
- pf_mtag->tag = tag;
- #else
- m->m_pkthdr.pf.tag = tag;
- #endif
- if (rtableid >= 0)
--#ifdef __FreeBSD__
-+#if 1
- {
- M_SETFIB(m, rtableid);
- }
-@@ -2777,7 +2777,7 @@
- (*r)->anchor->match = 0;
- if (match)
- *match = 0;
--#ifdef __FreeBSD__
-+#if 1
- if (*depth >= sizeof(V_pf_anchor_stack) /
- sizeof(V_pf_anchor_stack[0])) {
- #else
-@@ -2789,7 +2789,7 @@
- return;
- } else if (*depth == 0 && a != NULL)
- *a = *r;
--#ifdef __FreeBSD__
-+#if 1
- f = V_pf_anchor_stack + (*depth)++;
- #else
- f = pf_anchor_stack + (*depth)++;
-@@ -2822,7 +2822,7 @@
- do {
- if (*depth <= 0)
- break;
--#ifdef __FreeBSD__
-+#if 1
- f = V_pf_anchor_stack + *depth - 1;
- #else
- f = pf_anchor_stack + *depth - 1;
-@@ -2913,7 +2913,7 @@
- #endif /* INET6 */
-
- int
--#ifdef __FreeBSD__
-+#if 1
- pf_socket_lookup(int direction, struct pf_pdesc *pd, struct inpcb *inp_arg)
- #else
- pf_socket_lookup(int direction, struct pf_pdesc *pd)
-@@ -2921,7 +2921,7 @@
- {
- struct pf_addr *saddr, *daddr;
- u_int16_t sport, dport;
--#ifdef __FreeBSD__
-+#if 1
- struct inpcbinfo *pi;
- #else
- struct inpcbtable *tb;
-@@ -2934,7 +2934,7 @@
- pd->lookup.gid = GID_MAX;
- pd->lookup.pid = NO_PID;
-
--#ifdef __FreeBSD__
-+#if 1
- if (inp_arg != NULL) {
- INP_LOCK_ASSERT(inp_arg);
- pd->lookup.uid = inp_arg->inp_cred->cr_uid;
-@@ -2949,7 +2949,7 @@
- return (-1);
- sport = pd->hdr.tcp->th_sport;
- dport = pd->hdr.tcp->th_dport;
--#ifdef __FreeBSD__
-+#if 1
- pi = &V_tcbinfo;
- #else
- tb = &tcbtable;
-@@ -2960,7 +2960,7 @@
- return (-1);
- sport = pd->hdr.udp->uh_sport;
- dport = pd->hdr.udp->uh_dport;
--#ifdef __FreeBSD__
-+#if 1
- pi = &V_udbinfo;
- #else
- tb = &udbtable;
-@@ -2984,7 +2984,7 @@
- switch (pd->af) {
- #ifdef INET
- case AF_INET:
--#ifdef __FreeBSD__
-+#if 1
- /*
- * XXXRW: would be nice if we had an mbuf here so that we
- * could use in_pcblookup_mbuf().
-@@ -3011,7 +3011,7 @@
- #endif /* INET */
- #ifdef INET6
- case AF_INET6:
--#ifdef __FreeBSD__
-+#if 1
- /*
- * XXXRW: would be nice if we had an mbuf here so that we
- * could use in6_pcblookup_mbuf().
-@@ -3041,7 +3041,7 @@
- default:
- return (-1);
- }
--#ifdef __FreeBSD__
-+#if 1
- INP_RLOCK_ASSERT(inp);
- pd->lookup.uid = inp->inp_cred->cr_uid;
- pd->lookup.gid = inp->inp_cred->cr_groups[0];
-@@ -3100,7 +3100,7 @@
- int hlen;
- u_int8_t hdr[60];
- u_int8_t *opt, optlen;
--#ifdef __FreeBSD__
-+#if 1
- u_int16_t mss = V_tcp_mssdflt;
- #else
- u_int16_t mss = tcp_mssdflt;
-@@ -3148,7 +3148,7 @@
- struct route_in6 ro6;
- #endif /* INET6 */
- struct rtentry *rt = NULL;
--#ifdef __FreeBSD__
-+#if 1
- int hlen = 0;
- u_int16_t mss = V_tcp_mssdflt;
- #else
-@@ -3165,7 +3165,7 @@
- dst->sin_family = AF_INET;
- dst->sin_len = sizeof(*dst);
- dst->sin_addr = addr->v4;
--#ifdef __FreeBSD__
-+#if 1
- in_rtalloc_ign(&ro, 0, rtableid);
- #else /* ! __FreeBSD__ */
- rtalloc_noclone(&ro, NO_CLONING);
-@@ -3181,7 +3181,7 @@
- dst6->sin6_family = AF_INET6;
- dst6->sin6_len = sizeof(*dst6);
- dst6->sin6_addr = addr->v6;
--#ifdef __FreeBSD__
-+#if 1
- in6_rtalloc_ign(&ro6, 0, rtableid);
- #else /* ! __FreeBSD__ */
- rtalloc_noclone((struct route *)&ro6, NO_CLONING);
-@@ -3193,7 +3193,7 @@
-
- if (rt && rt->rt_ifp) {
- mss = rt->rt_ifp->if_mtu - hlen - sizeof(struct tcphdr);
--#ifdef __FreeBSD__
-+#if 1
- mss = max(V_tcp_mssdflt, mss);
- #else
- mss = max(tcp_mssdflt, mss);
-@@ -3236,7 +3236,7 @@
- MD5_CTX ctx;
- u_int32_t digest[4];
-
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_tcp_secret_init == 0) {
- read_random(&V_pf_tcp_secret, sizeof(V_pf_tcp_secret));
- MD5Init(&V_pf_tcp_secret_ctx);
-@@ -3268,7 +3268,7 @@
- MD5Update(&ctx, (char *)&pd->dst->v4, sizeof(struct in_addr));
- }
- MD5Final((u_char *)digest, &ctx);
--#ifdef __FreeBSD__
-+#if 1
- V_pf_tcp_iss_off += 4096;
- #define ISN_RANDOM_INCREMENT (4096 - 1)
- return (digest[0] + (arc4random() & ISN_RANDOM_INCREMENT) +
-@@ -3284,7 +3284,7 @@
- pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction,
- struct pfi_kif *kif, struct mbuf *m, int off, void *h,
- struct pf_pdesc *pd, struct pf_rule **am, struct pf_ruleset **rsm,
--#ifdef __FreeBSD__
-+#if 1
- struct ifqueue *ifq, struct inpcb *inp)
- #else
- struct ifqueue *ifq)
-@@ -3305,7 +3305,7 @@
- int asd = 0;
- int match = 0;
- int state_icmp = 0;
--#ifdef __FreeBSD__
-+#if 1
- u_int16_t sport = 0, dport = 0;
- u_int16_t bproto_sum = 0, bip_sum = 0;
- #else
-@@ -3320,7 +3320,7 @@
- return (PF_DROP);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (inp != NULL)
- pd->lookup.done = pf_socket_lookup(direction, pd, inp);
- else if (V_debug_pfugidhack) {
-@@ -3551,7 +3551,7 @@
- r = TAILQ_NEXT(r, entries);
- /* tcp/udp only. uid.op always 0 in other cases */
- else if (r->uid.op && (pd->lookup.done || (pd->lookup.done =
--#ifdef __FreeBSD__
-+#if 1
- pf_socket_lookup(direction, pd, inp), 1)) &&
- #else
- pf_socket_lookup(direction, pd), 1)) &&
-@@ -3561,7 +3561,7 @@
- r = TAILQ_NEXT(r, entries);
- /* tcp/udp only. gid.op always 0 in other cases */
- else if (r->gid.op && (pd->lookup.done || (pd->lookup.done =
--#ifdef __FreeBSD__
-+#if 1
- pf_socket_lookup(direction, pd, inp), 1)) &&
- #else
- pf_socket_lookup(direction, pd), 1)) &&
-@@ -3570,13 +3570,13 @@
- pd->lookup.gid))
- r = TAILQ_NEXT(r, entries);
- else if (r->prob &&
--#ifdef __FreeBSD__
-+#if 1
- r->prob <= arc4random())
- #else
- r->prob <= arc4random_uniform(UINT_MAX - 1) + 1)
- #endif
- r = TAILQ_NEXT(r, entries);
--#ifdef __FreeBSD__
-+#if 1
- else if (r->match_tag && !pf_match_tag(m, r, &tag, pd->pf_mtag))
- #else
- else if (r->match_tag && !pf_match_tag(m, r, &tag))
-@@ -3674,7 +3674,7 @@
- ack++;
- if (th->th_flags & TH_FIN)
- ack++;
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(m, r, af, pd->dst,
- #else
- pf_send_tcp(r, af, pd->dst,
-@@ -3696,7 +3696,7 @@
- if (r->action == PF_DROP)
- goto cleanup;
-
--#ifdef __FreeBSD__
-+#if 1
- if (pf_tag_packet(m, tag, rtableid, pd->pf_mtag)) {
- #else
- if (pf_tag_packet(m, tag, rtableid)) {
-@@ -3714,7 +3714,7 @@
- if (action != PF_PASS)
- return (action);
- } else {
--#ifdef __FreeBSD__
-+#if 1
- if (sk != NULL)
- pool_put(&V_pf_state_key_pl, sk);
- if (nk != NULL)
-@@ -3733,7 +3733,7 @@
-
- #if NPFSYNC > 0
- if (*sm != NULL && !ISSET((*sm)->state_flags, PFSTATE_NOSYNC) &&
--#ifdef __FreeBSD__
-+#if 1
- direction == PF_OUT && pfsync_up_ptr != NULL && pfsync_up_ptr()) {
- #else
- direction == PF_OUT && pfsync_up()) {
-@@ -3744,7 +3744,7 @@
- * firewall has to know about it to allow
- * replies through it.
- */
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_defer_ptr != NULL &&
- pfsync_defer_ptr(*sm, m))
- #else
-@@ -3757,7 +3757,7 @@
- return (PF_PASS);
-
- cleanup:
--#ifdef __FreeBSD__
-+#if 1
- if (sk != NULL)
- pool_put(&V_pf_state_key_pl, sk);
- if (nk != NULL)
-@@ -3782,7 +3782,7 @@
- struct pf_state *s = NULL;
- struct pf_src_node *sn = NULL;
- struct tcphdr *th = pd->hdr.tcp;
--#ifdef __FreeBSD__
-+#if 1
- u_int16_t mss = V_tcp_mssdflt;
- #else
- u_int16_t mss = tcp_mssdflt;
-@@ -3791,7 +3791,7 @@
-
- /* check maximums */
- if (r->max_states && (r->states_cur >= r->max_states)) {
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.lcounters[LCNT_STATES]++;
- #else
- pf_status.lcounters[LCNT_STATES]++;
-@@ -3812,7 +3812,7 @@
- REASON_SET(&reason, PFRES_SRCLIMIT);
- goto csfailed;
- }
--#ifdef __FreeBSD__
-+#if 1
- s = pool_get(&V_pf_state_pl, PR_NOWAIT | PR_ZERO);
- #else
- s = pool_get(&pf_state_pl, PR_NOWAIT | PR_ZERO);
-@@ -3907,7 +3907,7 @@
- REASON_SET(&reason, PFRES_MEMORY);
- pf_src_tree_remove_state(s);
- STATE_DEC_COUNTERS(s);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_pl, s);
- #else
- pool_put(&pf_state_pl, s);
-@@ -3923,7 +3923,7 @@
- pf_normalize_tcp_cleanup(s);
- pf_src_tree_remove_state(s);
- STATE_DEC_COUNTERS(s);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_pl, s);
- #else
- pool_put(&pf_state_pl, s);
-@@ -3943,7 +3943,7 @@
- REASON_SET(&reason, PFRES_STATEINS);
- pf_src_tree_remove_state(s);
- STATE_DEC_COUNTERS(s);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_pl, s);
- #else
- pool_put(&pf_state_pl, s);
-@@ -3984,7 +3984,7 @@
- mss = pf_calc_mss(pd->src, pd->af, rtid, mss);
- mss = pf_calc_mss(pd->dst, pd->af, rtid, mss);
- s->src.mss = mss;
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(NULL, r, pd->af, pd->dst, pd->src, th->th_dport,
- #else
- pf_send_tcp(r, pd->af, pd->dst, pd->src, th->th_dport,
-@@ -3998,7 +3998,7 @@
- return (PF_PASS);
-
- csfailed:
--#ifdef __FreeBSD__
-+#if 1
- if (sk != NULL)
- pool_put(&V_pf_state_key_pl, sk);
- if (nk != NULL)
-@@ -4011,7 +4011,7 @@
- #endif
-
- if (sn != NULL && sn->states == 0 && sn->expire == 0) {
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_src_tree, &V_tree_src_tracking, sn);
- V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS]++;
- V_pf_status.src_nodes--;
-@@ -4024,7 +4024,7 @@
- #endif
- }
- if (nsn != sn && nsn != NULL && nsn->states == 0 && nsn->expire == 0) {
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_src_tree, &V_tree_src_tracking, nsn);
- V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS]++;
- V_pf_status.src_nodes--;
-@@ -4086,7 +4086,7 @@
- else if (r->prob && r->prob <=
- (arc4random() % (UINT_MAX - 1) + 1))
- r = TAILQ_NEXT(r, entries);
--#ifdef __FreeBSD__
-+#if 1
- else if (r->match_tag && !pf_match_tag(m, r, &tag, pd->pf_mtag))
- #else
- else if (r->match_tag && !pf_match_tag(m, r, &tag))
-@@ -4122,7 +4122,7 @@
- if (r->action != PF_PASS)
- return (PF_DROP);
-
--#ifdef __FreeBSD__
-+#if 1
- if (pf_tag_packet(m, tag, -1, pd->pf_mtag)) {
- #else
- if (pf_tag_packet(m, tag, -1)) {
-@@ -4381,7 +4381,7 @@
- * and keep updating the state TTL.
- */
-
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -4391,7 +4391,7 @@
- pf_print_flags(th->th_flags);
- printf(" seq=%u (%u) ack=%u len=%u ackskew=%d "
- "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack,
--#ifdef __FreeBSD__
-+#if 1
- pd->p_len, ackskew, (unsigned long long)(*state)->packets[0],
- (unsigned long long)(*state)->packets[1],
- #else
-@@ -4436,7 +4436,7 @@
- (*state)->src.state == TCPS_SYN_SENT) {
- /* Send RST for state mismatches during handshake */
- if (!(th->th_flags & TH_RST))
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(NULL, (*state)->rule.ptr, pd->af,
- #else
- pf_send_tcp((*state)->rule.ptr, pd->af,
-@@ -4449,7 +4449,7 @@
- src->seqlo = 0;
- src->seqhi = 1;
- src->max_win = 1;
--#ifdef __FreeBSD__
-+#if 1
- } else if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- } else if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -4460,7 +4460,7 @@
- printf(" seq=%u (%u) ack=%u len=%u ackskew=%d "
- "pkts=%llu:%llu dir=%s,%s\n",
- seq, orig_seq, ack, pd->p_len, ackskew,
--#ifdef __FreeBSD__
-+#if 1
- (unsigned long long)(*state)->packets[0],
- (unsigned long long)(*state)->packets[1],
- #else
-@@ -4580,7 +4580,7 @@
- key.port[0] = th->th_dport;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
- #else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -4606,7 +4606,7 @@
- REASON_SET(reason, PFRES_SYNPROXY);
- return (PF_DROP);
+ if ((filter_opts.divert.addr = host($2)) == NULL) {
+ yyerror("could not parse divert address: %s",
+ $2);
+@@ -2389,7 +2389,7 @@
}
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst,
- #else
- pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst,
-@@ -4640,7 +4640,7 @@
- (*state)->src.max_win = MAX(ntohs(th->th_win), 1);
- if ((*state)->dst.seqhi == 1)
- (*state)->dst.seqhi = htonl(arc4random());
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(NULL, (*state)->rule.ptr, pd->af,
- #else
- pf_send_tcp((*state)->rule.ptr, pd->af,
-@@ -4659,7 +4659,7 @@
- } else {
- (*state)->dst.max_win = MAX(ntohs(th->th_win), 1);
- (*state)->dst.seqlo = ntohl(th->th_seq);
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst,
- #else
- pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst,
-@@ -4668,7 +4668,7 @@
- ntohl(th->th_ack), ntohl(th->th_seq) + 1,
- TH_ACK, (*state)->src.max_win, 0, 0, 0,
- (*state)->tag, NULL, NULL);
--#ifdef __FreeBSD__
-+#if 1
- pf_send_tcp(NULL, (*state)->rule.ptr, pd->af,
- #else
- pf_send_tcp((*state)->rule.ptr, pd->af,
-@@ -4697,7 +4697,7 @@
- if (((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN) &&
- dst->state >= TCPS_FIN_WAIT_2 &&
- src->state >= TCPS_FIN_WAIT_2) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -4743,7 +4743,7 @@
-
- /* Copyback sequence modulation or stateful scrub changes if needed */
- if (copyback)
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off, sizeof(*th), (caddr_t)th);
- #else
- m_copyback(m, off, sizeof(*th), th);
-@@ -4774,7 +4774,7 @@
- key.port[0] = uh->uh_dport;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
- #else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -4816,7 +4816,7 @@
- pf_change_ap(pd->dst, &uh->uh_dport, pd->ip_sum,
- &uh->uh_sum, &nk->addr[pd->didx],
- nk->port[pd->didx], 1, pd->af);
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off, sizeof(*uh), (caddr_t)uh);
- #else
- m_copyback(m, off, sizeof(*uh), uh);
-@@ -4831,7 +4831,7 @@
- struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason)
- {
- struct pf_addr *saddr = pd->src, *daddr = pd->dst;
--#ifdef __FreeBSD__
-+#if 1
- u_int16_t icmpid = 0, *icmpsum;
- #else
- u_int16_t icmpid, *icmpsum;
-@@ -4887,7 +4887,7 @@
- PF_ACPY(&key.addr[0], pd->dst, key.af);
}
-
+ | DIVERTREPLY {
-#ifdef __FreeBSD__
+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
+ yyerror("divert-reply has no meaning in FreeBSD pf(4)");
+ YYERROR;
#else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -4926,7 +4926,7 @@
- }
+@@ -2855,7 +2855,7 @@
+ char *buf;
- m_copyback(m, off, ICMP_MINLEN,
+ /* ie. for 10/8 parsing */
-#ifdef __FreeBSD__
+#if 1
- (caddr_t)
- #endif
- pd->hdr.icmp);
-@@ -4948,7 +4948,7 @@
-
- m_copyback(m, off,
- sizeof(struct icmp6_hdr),
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- pd->hdr.icmp6);
-@@ -4965,7 +4965,7 @@
- */
-
- struct pf_pdesc pd2;
--#ifdef __FreeBSD__
-+#if 1
- bzero(&pd2, sizeof pd2);
- #endif
- #ifdef INET
-@@ -4975,7 +4975,7 @@
- struct ip6_hdr h2_6;
- int terminal = 0;
- #endif /* INET6 */
--#ifdef __FreeBSD__
-+#if 1
- int ipoff2 = 0;
- int off2 = 0;
+ if (asprintf(&buf, "%lld/%lld", (long long)$1, (long long)$3) == -1)
#else
-@@ -5102,7 +5102,7 @@
- key.port[pd2.sidx] = th.th_sport;
- key.port[pd2.didx] = th.th_dport;
-
--#ifdef __FreeBSD__
-+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
- #else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -5132,7 +5132,7 @@
- if (!((*state)->state_flags & PFSTATE_SLOPPY) &&
- (!SEQ_GEQ(src->seqhi, seq) ||
- !SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)))) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -5149,7 +5149,7 @@
- REASON_SET(reason, PFRES_BADSTATE);
- return (PF_DROP);
- } else {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -5197,12 +5197,12 @@
- #ifdef INET
- case AF_INET:
- m_copyback(m, off, ICMP_MINLEN,
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- pd->hdr.icmp);
- m_copyback(m, ipoff2, sizeof(h2),
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- &h2);
-@@ -5212,19 +5212,19 @@
- case AF_INET6:
- m_copyback(m, off,
- sizeof(struct icmp6_hdr),
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- pd->hdr.icmp6);
- m_copyback(m, ipoff2, sizeof(h2_6),
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- &h2_6);
- break;
- #endif /* INET6 */
- }
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off2, 8, (caddr_t)&th);
- #else
- m_copyback(m, off2, 8, &th);
-@@ -5252,7 +5252,7 @@
- key.port[pd2.sidx] = uh.uh_sport;
- key.port[pd2.didx] = uh.uh_dport;
-
--#ifdef __FreeBSD__
-+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
- #else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -5287,11 +5287,11 @@
- #ifdef INET
- case AF_INET:
- m_copyback(m, off, ICMP_MINLEN,
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- pd->hdr.icmp);
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, ipoff2, sizeof(h2), (caddr_t)&h2);
- #else
- m_copyback(m, ipoff2, sizeof(h2), &h2);
-@@ -5302,19 +5302,19 @@
- case AF_INET6:
- m_copyback(m, off,
- sizeof(struct icmp6_hdr),
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- pd->hdr.icmp6);
- m_copyback(m, ipoff2, sizeof(h2_6),
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- &h2_6);
- break;
- #endif /* INET6 */
- }
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off2, sizeof(uh), (caddr_t)&uh);
- #else
- m_copyback(m, off2, sizeof(uh), &uh);
-@@ -5341,7 +5341,7 @@
- PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af);
- key.port[0] = key.port[1] = iih.icmp_id;
-
--#ifdef __FreeBSD__
-+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
- #else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -5372,7 +5372,7 @@
- pd2.ip_sum, icmpsum,
- pd->ip_sum, 0, AF_INET);
-
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off, ICMP_MINLEN, (caddr_t)pd->hdr.icmp);
- m_copyback(m, ipoff2, sizeof(h2), (caddr_t)&h2);
- m_copyback(m, off2, ICMP_MINLEN, (caddr_t)&iih);
-@@ -5404,7 +5404,7 @@
- PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af);
- key.port[0] = key.port[1] = iih.icmp6_id;
-
--#ifdef __FreeBSD__
-+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
- #else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -5435,7 +5435,7 @@
- pd2.ip_sum, icmpsum,
- pd->ip_sum, 0, AF_INET6);
-
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off, sizeof(struct icmp6_hdr),
- (caddr_t)pd->hdr.icmp6);
- m_copyback(m, ipoff2, sizeof(h2_6), (caddr_t)&h2_6);
-@@ -5460,7 +5460,7 @@
- PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af);
- key.port[0] = key.port[1] = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
- #else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -5490,7 +5490,7 @@
- switch (pd2.af) {
- #ifdef INET
- case AF_INET:
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off, ICMP_MINLEN,
- (caddr_t)pd->hdr.icmp);
- m_copyback(m, ipoff2, sizeof(h2), (caddr_t)&h2);
-@@ -5505,12 +5505,12 @@
- case AF_INET6:
- m_copyback(m, off,
- sizeof(struct icmp6_hdr),
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- pd->hdr.icmp6);
- m_copyback(m, ipoff2, sizeof(h2_6),
--#ifdef __FreeBSD__
-+#if 1
- (caddr_t)
- #endif
- &h2_6);
-@@ -5544,7 +5544,7 @@
- key.port[1] = key.port[0] = 0;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- STATE_LOOKUP(kif, &key, direction, *state, m, pd->pf_mtag);
- #else
- STATE_LOOKUP(kif, &key, direction, *state, m);
-@@ -5575,7 +5575,7 @@
- if ((*state)->key[PF_SK_WIRE] != (*state)->key[PF_SK_STACK]) {
- struct pf_state_key *nk = (*state)->key[pd->didx];
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(nk, ("%s: nk is null", __FUNCTION__));
- KASSERT(pd, ("%s: pd is null", __FUNCTION__));
- KASSERT(pd->src, ("%s: pd->src is null", __FUNCTION__));
-@@ -5672,7 +5672,7 @@
- pf_routable(struct pf_addr *addr, sa_family_t af, struct pfi_kif *kif,
- int rtableid)
- {
--#ifdef __FreeBSD__
-+#if 1
- #ifdef RADIX_MPATH
- struct radix_node_head *rnh;
- #endif
-@@ -5680,11 +5680,11 @@
- struct sockaddr_in *dst;
- int ret = 1;
- int check_mpath;
--#ifndef __FreeBSD__
-+#if 0
- extern int ipmultipath;
- #endif
- #ifdef INET6
--#ifndef __FreeBSD__
-+#if 0
- extern int ip6_multipath;
- #endif
- struct sockaddr_in6 *dst6;
-@@ -5697,7 +5697,7 @@
- struct ifnet *ifp;
-
- check_mpath = 0;
--#ifdef __FreeBSD__
-+#if 1
- #ifdef RADIX_MPATH
- /* XXX: stick to table 0 for now */
- rnh = rt_tables_get_rnh(0, af);
-@@ -5712,7 +5712,7 @@
- dst->sin_family = AF_INET;
- dst->sin_len = sizeof(*dst);
- dst->sin_addr = addr->v4;
--#ifndef __FreeBSD__
-+#if 0
- if (ipmultipath)
- check_mpath = 1;
- #endif
-@@ -5729,7 +5729,7 @@
- dst6->sin6_family = AF_INET6;
- dst6->sin6_len = sizeof(*dst6);
- dst6->sin6_addr = addr->v6;
--#ifndef __FreeBSD__
-+#if 0
- if (ip6_multipath)
- check_mpath = 1;
- #endif
-@@ -5743,7 +5743,7 @@
- if (kif != NULL && kif->pfik_ifp->if_type == IFT_ENC)
- goto out;
-
--#ifdef __FreeBSD__
-+#if 1
- switch (af) {
- #ifdef INET6
- case AF_INET6:
-@@ -5778,7 +5778,7 @@
- rn = (struct radix_node *)ro.ro_rt;
- do {
- rt = (struct rtentry *)rn;
--#ifndef __FreeBSD__ /* CARPDEV */
-+#if 0 /* CARPDEV */
- if (rt->rt_ifp->if_type == IFT_CARP)
- ifp = rt->rt_ifp->if_carpdev;
- else
-@@ -5787,7 +5787,7 @@
-
- if (kif->pfik_ifp == ifp)
- ret = 1;
--#ifdef __FreeBSD__
-+#if 1
- #ifdef RADIX_MPATH
- rn = rn_mpath_next(rn);
- #endif
-@@ -5836,7 +5836,7 @@
- return (0);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- switch (af) {
- #ifdef INET6
- case AF_INET6:
-@@ -5857,7 +5857,7 @@
- #endif
-
- if (ro.ro_rt != NULL) {
--#ifdef __FreeBSD__
-+#if 1
- /* XXX_IMPORT: later */
- #else
- if (ro.ro_rt->rt_labelid == aw->v.rtlabel)
-@@ -5883,7 +5883,7 @@
- struct pf_addr naddr;
- struct pf_src_node *sn = NULL;
- int error = 0;
--#ifdef __FreeBSD__
-+#if 1
- int sw_csum;
- #endif
- #ifdef IPSEC
-@@ -5894,7 +5894,7 @@
- (dir != PF_IN && dir != PF_OUT) || oifp == NULL)
- panic("pf_route: invalid parameters");
-
--#ifdef __FreeBSD__
-+#if 1
- if (pd->pf_mtag->routed++ > 3) {
- #else
- if ((*m)->m_pkthdr.pf.routed++ > 3) {
-@@ -5905,7 +5905,7 @@
- }
-
- if (r->rt == PF_DUPTO) {
--#ifdef __FreeBSD__
-+#if 1
- if ((m0 = m_dup(*m, M_DONTWAIT)) == NULL)
- #else
- if ((m0 = m_copym2(*m, 0, M_COPYALL, M_NOWAIT)) == NULL)
-@@ -5933,13 +5933,13 @@
- dst->sin_addr = ip->ip_dst;
-
- if (r->rt == PF_FASTROUTE) {
--#ifdef __FreeBSD__
-+#if 1
- in_rtalloc_ign(ro, 0, M_GETFIB(m0));
- #else
- rtalloc(ro);
- #endif
- if (ro->ro_rt == 0) {
--#ifdef __FreeBSD__
-+#if 1
- KMOD_IPSTAT_INC(ips_noroute);
- #else
- ipstat.ips_noroute++;
-@@ -5976,7 +5976,7 @@
- goto bad;
-
- if (oifp != ifp) {
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- if (pf_test(PF_OUT, ifp, &m0, NULL, NULL) != PF_PASS) {
- PF_LOCK();
-@@ -6000,7 +6000,7 @@
- ip = mtod(m0, struct ip *);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- /* Copied from FreeBSD 5.1-CURRENT ip_output. */
- m0->m_pkthdr.csum_flags |= CSUM_IP;
- sw_csum = m0->m_pkthdr.csum_flags & ~ifp->if_hwassist;
-@@ -6074,7 +6074,7 @@
- if ((ifp->if_capabilities & IFCAP_CSUM_IPv4) &&
- ifp->if_bridge == NULL) {
- m0->m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT;
--#ifdef __FreeBSD__
-+#if 1
- KMOD_IPSTAT_INC(ips_outhwcsum);
- #else
- ipstat.ips_outhwcsum++;
-@@ -6096,13 +6096,13 @@
- * Must be able to put at least 8 bytes per fragment.
- */
- if (ip->ip_off & htons(IP_DF)) {
--#ifdef __FreeBSD__
-+#if 1
- KMOD_IPSTAT_INC(ips_cantfrag);
- #else
- ipstat.ips_cantfrag++;
- #endif
- if (r->rt != PF_DUPTO) {
--#ifdef __FreeBSD__
-+#if 1
- /* icmp_error() expects host byte ordering */
- NTOHS(ip->ip_len);
- NTOHS(ip->ip_off);
-@@ -6120,7 +6120,7 @@
- }
-
- m1 = m0;
--#ifdef __FreeBSD__
-+#if 1
- /*
- * XXX: is cheaper + less error prone than own function
- */
-@@ -6131,7 +6131,7 @@
- error = ip_fragment(m0, ifp, ifp->if_mtu);
- #endif
- if (error) {
--#ifndef __FreeBSD__ /* ip_fragment does not do m_freem() on FreeBSD */
-+#if 0 /* ip_fragment does not do m_freem() on FreeBSD */
- m0 = NULL;
- #endif
- goto bad;
-@@ -6140,7 +6140,7 @@
- for (m0 = m1; m0; m0 = m1) {
- m1 = m0->m_nextpkt;
- m0->m_nextpkt = 0;
--#ifdef __FreeBSD__
-+#if 1
- if (error == 0) {
- PF_UNLOCK();
- error = (*ifp->if_output)(ifp, m0, sintosa(dst),
-@@ -6157,7 +6157,7 @@
- }
-
- if (error == 0)
--#ifdef __FreeBSD__
-+#if 1
- KMOD_IPSTAT_INC(ips_fragmented);
- #else
- ipstat.ips_fragmented++;
-@@ -6194,7 +6194,7 @@
- (dir != PF_IN && dir != PF_OUT) || oifp == NULL)
- panic("pf_route6: invalid parameters");
-
--#ifdef __FreeBSD__
-+#if 1
- if (pd->pf_mtag->routed++ > 3) {
- #else
- if ((*m)->m_pkthdr.pf.routed++ > 3) {
-@@ -6205,7 +6205,7 @@
- }
-
- if (r->rt == PF_DUPTO) {
--#ifdef __FreeBSD__
-+#if 1
- if ((m0 = m_dup(*m, M_DONTWAIT)) == NULL)
- #else
- if ((m0 = m_copym2(*m, 0, M_COPYALL, M_NOWAIT)) == NULL)
-@@ -6233,7 +6233,7 @@
-
- /* Cheat. XXX why only in the v6 case??? */
- if (r->rt == PF_FASTROUTE) {
--#ifdef __FreeBSD__
-+#if 1
- m0->m_flags |= M_SKIP_FIREWALL;
- PF_UNLOCK();
- ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL);
-@@ -6266,7 +6266,7 @@
- goto bad;
-
- if (oifp != ifp) {
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- if (pf_test6(PF_OUT, ifp, &m0, NULL, NULL) != PF_PASS) {
- PF_LOCK();
-@@ -6297,16 +6297,16 @@
- if (IN6_IS_SCOPE_EMBED(&dst->sin6_addr))
- dst->sin6_addr.s6_addr16[1] = htons(ifp->if_index);
- if ((u_long)m0->m_pkthdr.len <= ifp->if_mtu) {
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- nd6_output(ifp, ifp, m0, dst, NULL);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- } else {
- in6_ifstat_inc(ifp, ifs6_in_toobig);
--#ifdef __FreeBSD__
-+#if 1
- if (r->rt != PF_DUPTO) {
- PF_UNLOCK();
- icmp6_error(m0, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu);
-@@ -6331,7 +6331,7 @@
- }
- #endif /* INET6 */
-
--#ifdef __FreeBSD__
-+#if 1
- /*
- * FreeBSD supports cksum offloads for the following drivers.
- * em(4), fxp(4), ixgb(4), lge(4), ndis(4), nge(4), re(4),
-@@ -6561,7 +6561,7 @@
- }
- #endif
-
--#ifndef __FreeBSD__
-+#if 0
- struct pf_divert *
- pf_find_divert(struct mbuf *m)
- {
-@@ -6593,7 +6593,7 @@
-
- #ifdef INET
+ if (asprintf(&buf, "%lld/%lld", $1, $3) == -1)
+@@ -6020,7 +6020,7 @@
int
--#ifdef __FreeBSD__
-+#if 1
- pf_test(int dir, struct ifnet *ifp, struct mbuf **m0,
- struct ether_header *eh, struct inpcb *inp)
- #else
-@@ -6604,7 +6604,7 @@
- struct pfi_kif *kif;
- u_short action, reason = 0, log = 0;
- struct mbuf *m = *m0;
--#ifdef __FreeBSD__
-+#if 1
- struct ip *h = NULL;
- struct m_tag *ipfwtag;
- struct pf_rule *a = NULL, *r = &V_pf_default_rule, *tr, *nr;
-@@ -6617,7 +6617,7 @@
- struct pf_pdesc pd;
- int off, dirndx, pqid = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- if (!V_pf_status.running)
- {
-@@ -6630,7 +6630,7 @@
- #endif
-
- memset(&pd, 0, sizeof(pd));
--#ifdef __FreeBSD__
-+#if 1
- if ((pd.pf_mtag = pf_get_mtag(m)) == NULL) {
- PF_UNLOCK();
- DPFPRINTF(PF_DEBUG_URGENT,
-@@ -6638,7 +6638,7 @@
- return (PF_DROP);
- }
- #endif
--#ifndef __FreeBSD__
-+#if 0
- if (ifp->if_type == IFT_CARP && ifp->if_carpdev)
- kif = (struct pfi_kif *)ifp->if_carpdev->if_pf_kif;
- else
-@@ -6646,7 +6646,7 @@
- kif = (struct pfi_kif *)ifp->if_pf_kif;
-
- if (kif == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- DPFPRINTF(PF_DEBUG_URGENT,
-@@ -6654,16 +6654,16 @@
- return (PF_DROP);
- }
- if (kif->pfik_flags & PFI_IFLAG_SKIP)
--#ifdef __FreeBSD__
-+#if 1
- {
- PF_UNLOCK();
- #endif
- return (PF_PASS);
--#ifdef __FreeBSD__
-+#if 1
- }
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- M_ASSERTPKTHDR(m);
- #else
- #ifdef DIAGNOSTIC
-@@ -6679,7 +6679,7 @@
- goto done;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (m->m_flags & M_SKIP_FIREWALL) {
- PF_UNLOCK();
- return (PF_PASS);
-@@ -6689,7 +6689,7 @@
- return (PF_PASS);
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if (ip_divert_ptr != NULL &&
- ((ipfwtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL)) != NULL)) {
- struct ipfw_rule_ref *rr = (struct ipfw_rule_ref *)(ipfwtag+1);
-@@ -6761,7 +6761,7 @@
- &reason);
- if (action == PF_PASS) {
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_update_state_ptr != NULL)
- pfsync_update_state_ptr(s);
- #else
-@@ -6772,7 +6772,7 @@
- a = s->anchor.ptr;
- log = s->log;
- } else if (s == NULL)
--#ifdef __FreeBSD__
-+#if 1
- action = pf_test_rule(&r, &s, dir, kif,
- m, off, h, &pd, &a, &ruleset, NULL, inp);
- #else
-@@ -6801,7 +6801,7 @@
- action = pf_test_state_udp(&s, dir, kif, m, off, h, &pd);
- if (action == PF_PASS) {
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_update_state_ptr != NULL)
- pfsync_update_state_ptr(s);
- #else
-@@ -6812,7 +6812,7 @@
- a = s->anchor.ptr;
- log = s->log;
- } else if (s == NULL)
--#ifdef __FreeBSD__
-+#if 1
- action = pf_test_rule(&r, &s, dir, kif,
- m, off, h, &pd, &a, &ruleset, NULL, inp);
- #else
-@@ -6835,7 +6835,7 @@
- &reason);
- if (action == PF_PASS) {
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_update_state_ptr != NULL)
- pfsync_update_state_ptr(s);
- #else
-@@ -6846,7 +6846,7 @@
- a = s->anchor.ptr;
- log = s->log;
- } else if (s == NULL)
--#ifdef __FreeBSD__
-+#if 1
- action = pf_test_rule(&r, &s, dir, kif,
- m, off, h, &pd, &a, &ruleset, NULL, inp);
- #else
-@@ -6869,7 +6869,7 @@
- action = pf_test_state_other(&s, dir, kif, m, &pd);
- if (action == PF_PASS) {
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_update_state_ptr != NULL)
- pfsync_update_state_ptr(s);
- #else
-@@ -6880,7 +6880,7 @@
- a = s->anchor.ptr;
- log = s->log;
- } else if (s == NULL)
--#ifdef __FreeBSD__
-+#if 1
- action = pf_test_rule(&r, &s, dir, kif, m, off, h,
- &pd, &a, &ruleset, NULL, inp);
- #else
-@@ -6901,14 +6901,14 @@
- }
-
- if ((s && s->tag) || r->rtableid >= 0)
--#ifdef __FreeBSD__
-+#if 1
- pf_tag_packet(m, s ? s->tag : 0, r->rtableid, pd.pf_mtag);
- #else
- pf_tag_packet(m, s ? s->tag : 0, r->rtableid);
- #endif
-
- if (dir == PF_IN && s && s->key[PF_SK_STACK])
--#ifdef __FreeBSD__
-+#if 1
- pd.pf_mtag->statekey = s->key[PF_SK_STACK];
- #else
- m->m_pkthdr.pf.statekey = s->key[PF_SK_STACK];
-@@ -6916,7 +6916,7 @@
-
- #ifdef ALTQ
- if (action == PF_PASS && r->qid) {
--#ifdef __FreeBSD__
-+#if 1
- if (pqid || (pd.tos & IPTOS_LOWDELAY))
- pd.pf_mtag->qid = r->pqid;
- else
-@@ -6945,13 +6945,13 @@
- (s->nat_rule.ptr->action == PF_RDR ||
- s->nat_rule.ptr->action == PF_BINAT) &&
- (ntohl(pd.dst->v4.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET)
--#ifdef __FreeBSD__
-+#if 1
- m->m_flags |= M_SKIP_FIREWALL;
- #else
- m->m_pkthdr.pf.flags |= PF_TAG_TRANSLATE_LOCALHOST;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if (action == PF_PASS && r->divert.port &&
- ip_divert_ptr != NULL && !PACKET_LOOPED()) {
-
-@@ -7038,7 +7038,7 @@
- }
- tr = r;
- nr = (s != NULL) ? s->nat_rule.ptr : pd.nat_rule;
--#ifdef __FreeBSD__
-+#if 1
- if (nr != NULL && r == &V_pf_default_rule)
- #else
- if (nr != NULL && r == &pf_default_rule)
-@@ -7073,7 +7073,7 @@
- pf_route(m0, r, dir, kif->pfik_ifp, s, &pd);
- break;
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- return (action);
-@@ -7082,7 +7082,7 @@
-
- #ifdef INET6
- int
--#ifdef __FreeBSD__
-+#if 1
- pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0,
- struct ether_header *eh, struct inpcb *inp)
- #else
-@@ -7093,7 +7093,7 @@
- struct pfi_kif *kif;
- u_short action, reason = 0, log = 0;
- struct mbuf *m = *m0, *n = NULL;
--#ifdef __FreeBSD__
-+#if 1
- struct ip6_hdr *h = NULL;
- struct pf_rule *a = NULL, *r = &V_pf_default_rule, *tr, *nr;
- #else
-@@ -7105,7 +7105,7 @@
- struct pf_pdesc pd;
- int off, terminal = 0, dirndx, rh_cnt = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- if (!V_pf_status.running) {
- PF_UNLOCK();
-@@ -7117,7 +7117,7 @@
- #endif
-
- memset(&pd, 0, sizeof(pd));
--#ifdef __FreeBSD__
-+#if 1
- if ((pd.pf_mtag = pf_get_mtag(m)) == NULL) {
- PF_UNLOCK();
- DPFPRINTF(PF_DEBUG_URGENT,
-@@ -7125,7 +7125,7 @@
- return (PF_DROP);
- }
- #endif
--#ifndef __FreeBSD__
-+#if 0
- if (ifp->if_type == IFT_CARP && ifp->if_carpdev)
- kif = (struct pfi_kif *)ifp->if_carpdev->if_pf_kif;
- else
-@@ -7133,7 +7133,7 @@
- kif = (struct pfi_kif *)ifp->if_pf_kif;
-
- if (kif == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- DPFPRINTF(PF_DEBUG_URGENT,
-@@ -7141,16 +7141,16 @@
- return (PF_DROP);
- }
- if (kif->pfik_flags & PFI_IFLAG_SKIP)
--#ifdef __FreeBSD__
-+#if 1
- {
- PF_UNLOCK();
- #endif
- return (PF_PASS);
--#ifdef __FreeBSD__
-+#if 1
- }
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- M_ASSERTPKTHDR(m);
- #else
- #ifdef DIAGNOSTIC
-@@ -7166,14 +7166,14 @@
- goto done;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (pd.pf_mtag->flags & PF_TAG_GENERATED) {
- PF_UNLOCK();
- #else
- if (m->m_pkthdr.pf.flags & PF_TAG_GENERATED)
- #endif
- return (PF_PASS);
--#ifdef __FreeBSD__
-+#if 1
- }
- #endif
-
-@@ -7301,7 +7301,7 @@
- &reason);
- if (action == PF_PASS) {
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_update_state_ptr != NULL)
- pfsync_update_state_ptr(s);
- #else
-@@ -7312,7 +7312,7 @@
- a = s->anchor.ptr;
- log = s->log;
- } else if (s == NULL)
--#ifdef __FreeBSD__
-+#if 1
- action = pf_test_rule(&r, &s, dir, kif,
- m, off, h, &pd, &a, &ruleset, NULL, inp);
- #else
-@@ -7341,7 +7341,7 @@
- action = pf_test_state_udp(&s, dir, kif, m, off, h, &pd);
- if (action == PF_PASS) {
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_update_state_ptr != NULL)
- pfsync_update_state_ptr(s);
- #else
-@@ -7352,7 +7352,7 @@
- a = s->anchor.ptr;
- log = s->log;
- } else if (s == NULL)
--#ifdef __FreeBSD__
-+#if 1
- action = pf_test_rule(&r, &s, dir, kif,
- m, off, h, &pd, &a, &ruleset, NULL, inp);
- #else
-@@ -7382,7 +7382,7 @@
- m, off, h, &pd, &reason);
- if (action == PF_PASS) {
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_update_state_ptr != NULL)
- pfsync_update_state_ptr(s);
- #else
-@@ -7393,7 +7393,7 @@
- a = s->anchor.ptr;
- log = s->log;
- } else if (s == NULL)
--#ifdef __FreeBSD__
-+#if 1
- action = pf_test_rule(&r, &s, dir, kif,
- m, off, h, &pd, &a, &ruleset, NULL, inp);
- #else
-@@ -7407,7 +7407,7 @@
- action = pf_test_state_other(&s, dir, kif, m, &pd);
- if (action == PF_PASS) {
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_update_state_ptr != NULL)
- pfsync_update_state_ptr(s);
- #else
-@@ -7418,7 +7418,7 @@
- a = s->anchor.ptr;
- log = s->log;
- } else if (s == NULL)
--#ifdef __FreeBSD__
-+#if 1
- action = pf_test_rule(&r, &s, dir, kif, m, off, h,
- &pd, &a, &ruleset, NULL, inp);
- #else
-@@ -7445,14 +7445,14 @@
- }
-
- if ((s && s->tag) || r->rtableid >= 0)
--#ifdef __FreeBSD__
-+#if 1
- pf_tag_packet(m, s ? s->tag : 0, r->rtableid, pd.pf_mtag);
- #else
- pf_tag_packet(m, s ? s->tag : 0, r->rtableid);
- #endif
-
- if (dir == PF_IN && s && s->key[PF_SK_STACK])
--#ifdef __FreeBSD__
-+#if 1
- pd.pf_mtag->statekey = s->key[PF_SK_STACK];
- #else
- m->m_pkthdr.pf.statekey = s->key[PF_SK_STACK];
-@@ -7460,7 +7460,7 @@
-
- #ifdef ALTQ
- if (action == PF_PASS && r->qid) {
--#ifdef __FreeBSD__
-+#if 1
- if (pd.tos & IPTOS_LOWDELAY)
- pd.pf_mtag->qid = r->pqid;
- else
-@@ -7483,13 +7483,13 @@
- (s->nat_rule.ptr->action == PF_RDR ||
- s->nat_rule.ptr->action == PF_BINAT) &&
- IN6_IS_ADDR_LOOPBACK(&pd.dst->v6))
--#ifdef __FreeBSD__
-+#if 1
- m->m_flags |= M_SKIP_FIREWALL;
- #else
- m->m_pkthdr.pf.flags |= PF_TAG_TRANSLATE_LOCALHOST;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- /* XXX: Anybody working on it?! */
- if (r->divert.port)
- printf("pf: divert(9) is not supported for IPv6\n");
-@@ -7547,7 +7547,7 @@
- }
- tr = r;
- nr = (s != NULL) ? s->nat_rule.ptr : pd.nat_rule;
--#ifdef __FreeBSD__
-+#if 1
- if (nr != NULL && r == &V_pf_default_rule)
- #else
- if (nr != NULL && r == &pf_default_rule)
-@@ -7581,7 +7581,7 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- return (action);
-@@ -7591,7 +7591,7 @@
- int
- pf_check_congestion(struct ifqueue *ifq)
+ rt_tableid_max(void)
{
-#ifdef __FreeBSD__
+#if 1
- /* XXX_IMPORT: later */
- return (0);
- #else
-@@ -7609,7 +7609,7 @@
- void
- pf_pkt_addr_changed(struct mbuf *m)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pf_mtag *pf_tag;
+ int fibs;
+ size_t l = sizeof(fibs);
- if ((pf_tag = pf_find_mtag(m)) != NULL)
---- a/src/sys/contrib/pf/net/pf_if.c
-+++ b/src/sys/contrib/pf/net/pf_if.c
-@@ -32,7 +32,7 @@
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
--#if defined(__FreeBSD__)
-+#if 1
- #include "opt_inet.h"
- #include "opt_inet6.h"
-
-@@ -42,7 +42,7 @@
-
- #include <sys/param.h>
- #include <sys/systm.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/malloc.h>
- #endif
- #include <sys/mbuf.h>
-@@ -50,17 +50,17 @@
+--- a/src/sbin/pfctl/pfctl.c
++++ b/src/sbin/pfctl/pfctl.c
+@@ -39,7 +39,7 @@
#include <sys/socket.h>
- #include <sys/socketvar.h>
- #include <sys/kernel.h>
--#ifndef __FreeBSD__
-+#if 0
- #include <sys/device.h>
- #endif
- #include <sys/time.h>
--#ifndef __FreeBSD__
-+#if 0
- #include <sys/pool.h>
- #endif
+ #include <sys/stat.h>
- #include <net/if.h>
- #include <net/if_types.h>
-#ifdef __FreeBSD__
+#if 1
- #include <net/vnet.h>
+ #include <sys/endian.h>
#endif
-@@ -76,7 +76,7 @@
- #include <netinet/ip6.h>
- #endif /* INET6 */
-
+@@ -250,7 +250,7 @@
+ if (ioctl(dev, DIOCSTART)) {
+ if (errno == EEXIST)
+ errx(1, "pf already enabled");
-#ifdef __FreeBSD__
+#if 1
- VNET_DEFINE(struct pfi_kif *, pfi_all);
- VNET_DEFINE(uma_zone_t, pfi_addr_pl);
- VNET_DEFINE(struct pfi_ifhead, pfi_ifs);
-@@ -98,7 +98,7 @@
- int pfi_buffer_cnt;
- int pfi_buffer_max;
+ else if (errno == ESRCH)
+ errx(1, "pfil registeration failed");
#endif
--#ifdef __FreeBSD__
-+#if 1
- eventhandler_tag pfi_attach_cookie;
- eventhandler_tag pfi_detach_cookie;
- eventhandler_tag pfi_attach_group_cookie;
-@@ -117,7 +117,7 @@
- int pfi_if_compare(struct pfi_kif *, struct pfi_kif *);
- int pfi_skip_if(const char *, struct pfi_kif *);
- int pfi_unmask(void *);
--#ifdef __FreeBSD__
-+#if 1
- void pfi_attach_ifnet_event(void * __unused, struct ifnet *);
- void pfi_detach_ifnet_event(void * __unused, struct ifnet *);
- void pfi_attach_group_event(void *, struct ifg_group *);
-@@ -135,18 +135,18 @@
- void
- pfi_initialize(void)
- {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pfi_all != NULL) /* already initialized */
+@@ -2185,7 +2185,7 @@
+ /* turn off options */
+ opts &= ~ (PF_OPT_DISABLE | PF_OPT_ENABLE);
+ clearopt = showopt = debugopt = NULL;
+-#if defined(__FreeBSD__) && !defined(ENABLE_ALTQ)
++#if 1 && !defined(ENABLE_ALTQ)
+ altqsupport = 0;
#else
- if (pfi_all != NULL) /* already initialized */
- #endif
- return;
+ altqsupport = 1;
+--- a/src/sbin/pfctl/pfctl.h
++++ b/src/sbin/pfctl/pfctl.h
+@@ -86,7 +86,7 @@
+ int pfctl_show_ifaces(const char *, int);
+ FILE *pfctl_fopen(const char *, const char *);
--#ifndef __FreeBSD__
-+#if 0
- pool_init(&V_pfi_addr_pl, sizeof(struct pfi_dynaddr), 0, 0, 0,
- "pfiaddrpl", &pool_allocator_nointr);
- #endif
-#ifdef __FreeBSD__
+#if 1
- V_pfi_buffer_max = 64;
- V_pfi_buffer = malloc(V_pfi_buffer_max * sizeof(*V_pfi_buffer),
- PFI_MTYPE, M_WAITOK);
-@@ -160,7 +160,7 @@
- if ((pfi_all = pfi_kif_get(IFG_ALL)) == NULL)
- #endif
- panic("pfi_kif_get for pfi_all failed");
--#ifdef __FreeBSD__
-+#if 1
- struct ifg_group *ifg;
- struct ifnet *ifp;
+ extern int altqsupport;
+ extern int dummynetsupport;
+ #define HTONL(x) (x) = htonl((__uint32_t)(x))
+--- a/src/sbin/pfctl/pfctl_altq.c
++++ b/src/sbin/pfctl/pfctl_altq.c
+@@ -77,7 +77,7 @@
+ double);
+ static double sc_x2y(struct service_curve *, double);
-@@ -186,7 +186,7 @@
- #endif
- }
-
-#ifdef __FreeBSD__
+#if 1
- void
- pfi_cleanup(void)
- {
-@@ -224,7 +224,7 @@
-
- bzero(&s, sizeof(s));
- strlcpy(s.pfik_name, kif_name, sizeof(s.pfik_name));
--#ifdef __FreeBSD__
-+#if 1
- if ((kif = RB_FIND(pfi_ifhead, &V_pfi_ifs, (struct pfi_kif *)&s)) != NULL)
+ u_int32_t getifspeed(int, char *);
#else
- if ((kif = RB_FIND(pfi_ifhead, &pfi_ifs, (struct pfi_kif *)&s)) != NULL)
-@@ -232,7 +232,7 @@
- return (kif);
-
- /* create new one */
--#ifdef __FreeBSD__
-+#if 1
- if ((kif = malloc(sizeof(*kif), PFI_MTYPE, M_NOWAIT | M_ZERO)) == NULL)
- #else
- if ((kif = malloc(sizeof(*kif), PFI_MTYPE, M_DONTWAIT|M_ZERO)) == NULL)
-@@ -240,7 +240,7 @@
- return (NULL);
-
- strlcpy(kif->pfik_name, kif_name, sizeof(kif->pfik_name));
--#ifdef __FreeBSD__
-+#if 1
- /*
- * It seems that the value of time_second is in unintialzied state
- * when pf sets interface statistics clear time in boot phase if pf
-@@ -254,7 +254,7 @@
- #endif
- TAILQ_INIT(&kif->pfik_dynaddrs);
-
--#ifdef __FreeBSD__
-+#if 1
- RB_INSERT(pfi_ifhead, &V_pfi_ifs, kif);
- #else
- RB_INSERT(pfi_ifhead, &pfi_ifs, kif);
-@@ -305,7 +305,7 @@
- panic("pfi_kif_unref with unknown type");
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (kif->pfik_ifp != NULL || kif->pfik_group != NULL || kif == V_pfi_all)
- #else
- if (kif->pfik_ifp != NULL || kif->pfik_group != NULL || kif == pfi_all)
-@@ -315,7 +315,7 @@
- if (kif->pfik_rules || kif->pfik_states)
+ u_int32_t getifspeed(char *);
+@@ -153,7 +153,7 @@
return;
-
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pfi_ifhead, &V_pfi_ifs, kif);
- #else
- RB_REMOVE(pfi_ifhead, &pfi_ifs, kif);
-@@ -347,7 +347,7 @@
-
- pfi_initialize();
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- V_pfi_update++;
- #else
- pfi_update++;
-@@ -358,7 +358,7 @@
- kif->pfik_ifp = ifp;
- ifp->if_pf_kif = (caddr_t)kif;
-
--#ifndef __FreeBSD__
-+#if 0
- if ((kif->pfik_ah_cookie = hook_establish(ifp->if_addrhooks, 1,
- pfi_kifaddr_update, kif)) == NULL)
- panic("pfi_attach_ifnet: cannot allocate '%s' address hook",
-@@ -380,12 +380,12 @@
- return;
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- V_pfi_update++;
- #else
- pfi_update++;
- #endif
--#ifndef __FreeBSD__
-+#if 0
- hook_disestablish(ifp->if_addrhooks, kif->pfik_ah_cookie);
- #endif
- pfi_kif_update(kif);
-@@ -404,7 +404,7 @@
-
- pfi_initialize();
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- V_pfi_update++;
- #else
- pfi_update++;
-@@ -428,7 +428,7 @@
- return;
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- V_pfi_update++;
- #else
- pfi_update++;
-@@ -447,7 +447,7 @@
- int s;
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- V_pfi_update++;
- #else
- pfi_update++;
-@@ -505,7 +505,7 @@
-
- if (aw->type != PF_ADDR_DYNIFTL)
- return (0);
--#ifdef __FreeBSD__
-+#if 1
- if ((dyn = pool_get(&V_pfi_addr_pl, PR_NOWAIT | PR_ZERO))
- #else
- if ((dyn = pool_get(&pfi_addr_pl, PR_WAITOK | PR_LIMITFAIL | PR_ZERO))
-@@ -566,7 +566,7 @@
- pf_remove_if_empty_ruleset(ruleset);
- if (dyn->pfid_kif != NULL)
- pfi_kif_unref(dyn->pfid_kif, PFI_KIF_REF_RULE);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pfi_addr_pl, dyn);
- #else
- pool_put(&pfi_addr_pl, dyn);
-@@ -604,14 +604,14 @@
- kif = dyn->pfid_kif;
- kt = dyn->pfid_kt;
-
--#ifdef __FreeBSD__
-+#if 1
- if (kt->pfrkt_larg != V_pfi_update) {
- #else
- if (kt->pfrkt_larg != pfi_update) {
- #endif
- /* this table needs to be brought up-to-date */
- pfi_table_update(kt, kif, dyn->pfid_net, dyn->pfid_iflags);
--#ifdef __FreeBSD__
-+#if 1
- kt->pfrkt_larg = V_pfi_update;
- #else
- kt->pfrkt_larg = pfi_update;
-@@ -626,7 +626,7 @@
- int e, size2 = 0;
- struct ifg_member *ifgm;
-
--#ifdef __FreeBSD__
-+#if 1
- V_pfi_buffer_cnt = 0;
- #else
- pfi_buffer_cnt = 0;
-@@ -638,7 +638,7 @@
- TAILQ_FOREACH(ifgm, &kif->pfik_group->ifg_members, ifgm_next)
- pfi_instance_add(ifgm->ifgm_ifp, net, flags);
-
--#ifdef __FreeBSD__
-+#if 1
- if ((e = pfr_set_addrs(&kt->pfrkt_t, V_pfi_buffer, V_pfi_buffer_cnt, &size2,
- NULL, NULL, NULL, 0, PFR_TFLAG_ALLMASK)))
- printf("pfi_table_update: cannot set %d new addresses "
-@@ -666,7 +666,7 @@
- af = ia->ifa_addr->sa_family;
- if (af != AF_INET && af != AF_INET6)
- continue;
--#ifdef __FreeBSD__
-+#if 1
- /*
- * XXX: For point-to-point interfaces, (ifname:0) and IPv4,
- * jump over addresses without a proper route to work
-@@ -726,7 +726,7 @@
- struct pfr_addr *p;
- int i;
-
--#ifdef __FreeBSD__
-+#if 1
- if (V_pfi_buffer_cnt >= V_pfi_buffer_max) {
- int new_max = V_pfi_buffer_max * 2;
- #else
-@@ -736,7 +736,7 @@
-
- if (new_max > PFI_BUFFER_MAX) {
- printf("pfi_address_add: address buffer full (%d/%d)\n",
--#ifdef __FreeBSD__
-+#if 1
- V_pfi_buffer_cnt, PFI_BUFFER_MAX);
- #else
- pfi_buffer_cnt, PFI_BUFFER_MAX);
-@@ -744,21 +744,21 @@
- return;
- }
- p = malloc(new_max * sizeof(*V_pfi_buffer), PFI_MTYPE,
--#ifdef __FreeBSD__
-+#if 1
- M_NOWAIT);
- #else
- M_DONTWAIT);
- #endif
- if (p == NULL) {
- printf("pfi_address_add: no memory to grow buffer "
--#ifdef __FreeBSD__
-+#if 1
- "(%d/%d)\n", V_pfi_buffer_cnt, PFI_BUFFER_MAX);
- #else
- "(%d/%d)\n", pfi_buffer_cnt, PFI_BUFFER_MAX);
- #endif
- return;
- }
--#ifdef __FreeBSD__
-+#if 1
- memcpy(V_pfi_buffer, p, V_pfi_buffer_cnt * sizeof(*V_pfi_buffer));
- /* no need to zero buffer */
- free(V_pfi_buffer, PFI_MTYPE);
-@@ -774,7 +774,7 @@
}
- if (af == AF_INET && net > 32)
- net = 128;
--#ifdef __FreeBSD__
-+#if 1
- p = V_pfi_buffer + V_pfi_buffer_cnt++;
- #else
- p = pfi_buffer + pfi_buffer_cnt++;
-@@ -811,7 +811,7 @@
- aw->p.dyn->pfid_kif = NULL;
- pfr_detach_table(aw->p.dyn->pfid_kt);
- aw->p.dyn->pfid_kt = NULL;
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pfi_addr_pl, aw->p.dyn);
- #else
- pool_put(&pfi_addr_pl, aw->p.dyn);
-@@ -836,7 +836,7 @@
- struct pfi_kif *kif = (struct pfi_kif *)v;
- s = splsoftnet();
-#ifdef __FreeBSD__
+#if 1
- V_pfi_update++;
- #else
- pfi_update++;
-@@ -862,7 +862,7 @@
-
- strlcpy(key.pfik_name, name, sizeof(key.pfik_name));
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- p = RB_FIND(pfi_ifhead, &V_pfi_ifs, (struct pfi_kif *)&key);
- #else
- p = RB_FIND(pfi_ifhead, &pfi_ifs, (struct pfi_kif *)&key);
-@@ -914,12 +914,12 @@
- {
- struct pfi_kif *p, *nextp;
- int s, n = 0;
--#ifdef __FreeBSD__
-+#if 1
- int error;
+ if (a->local_flags & PFALTQ_FLAG_IF_REMOVED)
+ printf("INACTIVE ");
#endif
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- for (p = RB_MIN(pfi_ifhead, &V_pfi_ifs); p; p = nextp) {
- nextp = RB_NEXT(pfi_ifhead, &V_pfi_ifs, p);
- #else
-@@ -932,7 +932,7 @@
- if (!p->pfik_tzero)
- p->pfik_tzero = time_second;
- pfi_kif_ref(p, PFI_KIF_REF_RULE);
--#ifdef __FreeBSD__
-+#if 1
- PF_COPYOUT(p, buf++, sizeof(*buf), error);
- if (error) {
- #else
-@@ -942,7 +942,7 @@
- splx(s);
- return (EFAULT);
- }
--#ifdef __FreeBSD__
-+#if 1
- nextp = RB_NEXT(pfi_ifhead, &V_pfi_ifs, p);
- #else
- nextp = RB_NEXT(pfi_ifhead, &pfi_ifs, p);
-@@ -981,7 +981,7 @@
- int s;
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(p, pfi_ifhead, &V_pfi_ifs) {
- #else
- RB_FOREACH(p, pfi_ifhead, &pfi_ifs) {
-@@ -1001,7 +1001,7 @@
- int s;
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(p, pfi_ifhead, &V_pfi_ifs) {
- #else
- RB_FOREACH(p, pfi_ifhead, &pfi_ifs) {
-@@ -1034,7 +1034,7 @@
- return (b);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- void
- pfi_attach_ifnet_event(void *arg __unused, struct ifnet *ifp)
+@@ -193,7 +193,7 @@
{
---- a/src/sys/contrib/pf/net/pf_ioctl.c
-+++ b/src/sys/contrib/pf/net/pf_ioctl.c
-@@ -35,7 +35,7 @@
- *
- */
+ unsigned int i;
-#ifdef __FreeBSD__
+#if 1
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-@@ -66,7 +66,7 @@
- #include <sys/socketvar.h>
- #include <sys/kernel.h>
- #include <sys/time.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/ucred.h>
- #include <sys/jail.h>
- #include <sys/module.h>
-@@ -80,14 +80,14 @@
- #include <sys/proc.h>
- #include <sys/malloc.h>
- #include <sys/kthread.h>
--#ifndef __FreeBSD__
-+#if 0
- #include <sys/rwlock.h>
- #include <uvm/uvm_extern.h>
+ if (a->local_flags & PFALTQ_FLAG_IF_REMOVED)
+ printf("INACTIVE ");
#endif
-
- #include <net/if.h>
- #include <net/if_types.h>
+@@ -239,7 +239,7 @@
+ if (bw->bw_absolute > 0)
+ pa->ifbandwidth = bw->bw_absolute;
+ else
-#ifdef __FreeBSD__
+#if 1
- #include <net/vnet.h>
- #endif
- #include <net/route.h>
-@@ -99,7 +99,7 @@
- #include <netinet/ip_var.h>
- #include <netinet/ip_icmp.h>
-
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/md5.h>
+ if ((rate = getifspeed(pf->dev, pa->ifname)) == 0) {
#else
- #include <dev/rndvar.h>
-@@ -122,14 +122,14 @@
- #include <altq/altq.h>
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/limits.h>
- #include <sys/lock.h>
- #include <sys/mutex.h>
- #include <net/pfil.h>
- #endif /* __FreeBSD__ */
-
--#ifdef __FreeBSD__
-+#if 1
- void init_zone_var(void);
- void cleanup_pf_zone(void);
- int pfattach(void);
-@@ -144,7 +144,7 @@
-
- void pf_mv_pool(struct pf_palist *, struct pf_palist *);
- void pf_empty_pool(struct pf_palist *);
--#ifdef __FreeBSD__
-+#if 1
- int pfioctl(struct cdev *, u_long, caddr_t, int, struct thread *);
- #else
- int pfioctl(dev_t, u_long, caddr_t, int, struct proc *);
-@@ -168,7 +168,7 @@
-
- #define TAGID_MAX 50000
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DEFINE(struct pf_rule, pf_default_rule);
- VNET_DEFINE(struct sx, pf_consistency_lock);
-
-@@ -206,13 +206,13 @@
- void pf_rtlabel_remove(struct pf_addr_wrap *);
- void pf_rtlabel_copyout(struct pf_addr_wrap *);
-
--#ifdef __FreeBSD__
-+#if 1
- #define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x
- #else
- #define DPFPRINTF(n, x) if (pf_status.debug >= (n)) printf x
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- struct cdev *pf_dev;
-
- /*
-@@ -599,7 +599,7 @@
- pf_tbladdr_remove(&empty_pool_pa->addr);
- pfi_kif_unref(empty_pool_pa->kif, PFI_KIF_REF_RULE);
- TAILQ_REMOVE(poola, empty_pool_pa, entries);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_pooladdr_pl, empty_pool_pa);
- #else
- pool_put(&pf_pooladdr_pl, empty_pool_pa);
-@@ -650,7 +650,7 @@
- pfi_kif_unref(rule->kif, PFI_KIF_REF_RULE);
- pf_anchor_remove(rule);
- pf_empty_pool(&rule->rpool.list);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_rule_pl, rule);
- #else
- pool_put(&pf_rule_pl, rule);
-@@ -735,7 +735,7 @@
- u_int16_t
- pf_tagname2tag(char *tagname)
- {
--#ifdef __FreeBSD__
-+#if 1
- return (tagname2tag(&V_pf_tags, tagname));
- #else
- return (tagname2tag(&pf_tags, tagname));
-@@ -745,7 +745,7 @@
- void
- pf_tag2tagname(u_int16_t tagid, char *p)
- {
--#ifdef __FreeBSD__
-+#if 1
- tag2tagname(&V_pf_tags, tagid, p);
- #else
- tag2tagname(&pf_tags, tagid, p);
-@@ -757,7 +757,7 @@
- {
- struct pf_tagname *t;
-
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(t, &V_pf_tags, entries)
- #else
- TAILQ_FOREACH(t, &pf_tags, entries)
-@@ -771,7 +771,7 @@
- void
- pf_tag_unref(u_int16_t tag)
- {
--#ifdef __FreeBSD__
-+#if 1
- tag_unref(&V_pf_tags, tag);
- #else
- tag_unref(&pf_tags, tag);
-@@ -781,7 +781,7 @@
- int
- pf_rtlabel_add(struct pf_addr_wrap *a)
- {
--#ifdef __FreeBSD__
-+#if 1
- /* XXX_IMPORT: later */
- return (0);
- #else
-@@ -795,7 +795,7 @@
- void
- pf_rtlabel_remove(struct pf_addr_wrap *a)
- {
--#ifdef __FreeBSD__
-+#if 1
- /* XXX_IMPORT: later */
- #else
- if (a->type == PF_ADDR_RTLABEL)
-@@ -806,7 +806,7 @@
- void
- pf_rtlabel_copyout(struct pf_addr_wrap *a)
- {
--#ifdef __FreeBSD__
-+#if 1
- /* XXX_IMPORT: later */
- if (a->type == PF_ADDR_RTLABEL && a->v.rtlabel)
- strlcpy(a->v.rtlabelname, "?", sizeof(a->v.rtlabelname));
-@@ -828,7 +828,7 @@
- u_int32_t
- pf_qname2qid(char *qname)
- {
--#ifdef __FreeBSD__
-+#if 1
- return ((u_int32_t)tagname2tag(&V_pf_qids, qname));
- #else
- return ((u_int32_t)tagname2tag(&pf_qids, qname));
-@@ -838,7 +838,7 @@
- void
- pf_qid2qname(u_int32_t qid, char *p)
- {
--#ifdef __FreeBSD__
-+#if 1
- tag2tagname(&V_pf_qids, (u_int16_t)qid, p);
- #else
- tag2tagname(&pf_qids, (u_int16_t)qid, p);
-@@ -848,7 +848,7 @@
- void
- pf_qid_unref(u_int32_t qid)
- {
--#ifdef __FreeBSD__
-+#if 1
- tag_unref(&V_pf_qids, (u_int16_t)qid);
- #else
- tag_unref(&pf_qids, (u_int16_t)qid);
-@@ -862,7 +862,7 @@
- int error = 0;
-
- /* Purge the old altq list */
--#ifdef __FreeBSD__
-+#if 1
- while ((altq = TAILQ_FIRST(V_pf_altqs_inactive)) != NULL) {
- TAILQ_REMOVE(V_pf_altqs_inactive, altq, entries);
- if (altq->qname[0] == 0 &&
-@@ -876,7 +876,7 @@
- error = altq_remove(altq);
- } else
- pf_qid_unref(altq->qid);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_altq_pl, altq);
- #else
- pool_put(&pf_altq_pl, altq);
-@@ -884,7 +884,7 @@
- }
- if (error)
- return (error);
--#ifdef __FreeBSD__
-+#if 1
- *ticket = ++V_ticket_altqs_inactive;
- V_altqs_inactive_open = 1;
- #else
-@@ -900,7 +900,7 @@
- struct pf_altq *altq;
- int error = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- if (!V_altqs_inactive_open || ticket != V_ticket_altqs_inactive)
- return (0);
- /* Purge the old altq list */
-@@ -920,13 +920,13 @@
- error = altq_remove(altq);
- } else
- pf_qid_unref(altq->qid);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_altq_pl, altq);
- #else
- pool_put(&pf_altq_pl, altq);
- #endif
- }
--#ifdef __FreeBSD__
-+#if 1
- V_altqs_inactive_open = 0;
- #else
- altqs_inactive_open = 0;
-@@ -941,7 +941,7 @@
- struct pf_altq *altq;
- int s, err, error = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- if (!V_altqs_inactive_open || ticket != V_ticket_altqs_inactive)
- #else
- if (!altqs_inactive_open || ticket != ticket_altqs_inactive)
-@@ -950,7 +950,7 @@
-
- /* swap altqs, keep the old. */
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- old_altqs = V_pf_altqs_active;
- V_pf_altqs_active = V_pf_altqs_inactive;
- V_pf_altqs_inactive = old_altqs;
-@@ -963,7 +963,7 @@
- #endif
-
- /* Attach new disciplines */
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(altq, V_pf_altqs_active, entries) {
- if (altq->qname[0] == 0 &&
- (altq->local_flags & PFALTQ_FLAG_IF_REMOVED) == 0) {
-@@ -973,7 +973,7 @@
- #endif
- /* attach the discipline */
- error = altq_pfattach(altq);
--#ifdef __FreeBSD__
-+#if 1
- if (error == 0 && V_pf_altq_running)
- #else
- if (error == 0 && pf_altq_running)
-@@ -987,7 +987,7 @@
- }
-
- /* Purge the old altq list */
--#ifdef __FreeBSD__
-+#if 1
- while ((altq = TAILQ_FIRST(V_pf_altqs_inactive)) != NULL) {
- TAILQ_REMOVE(V_pf_altqs_inactive, altq, entries);
- if (altq->qname[0] == 0 &&
-@@ -998,7 +998,7 @@
- if (altq->qname[0] == 0) {
- #endif
- /* detach and destroy the discipline */
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_altq_running)
- #else
- if (pf_altq_running)
-@@ -1012,7 +1012,7 @@
- error = err;
- } else
- pf_qid_unref(altq->qid);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_altq_pl, altq);
- #else
- pool_put(&pf_altq_pl, altq);
-@@ -1020,7 +1020,7 @@
- }
- splx(s);
-
--#ifdef __FreeBSD__
-+#if 1
- V_altqs_inactive_open = 0;
- #else
- altqs_inactive_open = 0;
-@@ -1046,11 +1046,11 @@
- tb.rate = altq->ifbandwidth;
- tb.depth = altq->tbrsize;
- s = splnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- error = tbr_set(&ifp->if_snd, &tb);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- splx(s);
-@@ -1082,11 +1082,11 @@
- /* clear tokenbucket regulator */
- tb.rate = 0;
- s = splnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- error = tbr_set(&ifp->if_snd, &tb);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- splx(s);
+ if ((rate = getifspeed(pa->ifname)) == 0) {
@@ -1095,7 +1095,7 @@
- return (error);
+ return (buf);
}
-#ifdef __FreeBSD__
+#if 1
- void
- pf_altq_ifnet_event(struct ifnet *ifp, int remove)
- {
-@@ -1105,7 +1105,7 @@
- int error = 0;
-
- /* Interrupt userland queue modifications */
+ /*
+ * XXX
+ * FreeBSD does not have SIOCGIFDATA.
+@@ -1150,7 +1150,7 @@
+ sizeof(ifr.ifr_name))
+ errx(1, "getifmtu: strlcpy");
+ if (ioctl(s, SIOCGIFMTU, (caddr_t)&ifr) == -1)
-#ifdef __FreeBSD__
+#if 1
- if (V_altqs_inactive_open)
- pf_rollback_altq(V_ticket_altqs_inactive);
+ ifr.ifr_mtu = 1500;
#else
-@@ -1118,7 +1118,7 @@
- return;
-
- /* Copy the current active set */
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(a1, V_pf_altqs_active, entries) {
- a2 = pool_get(&V_pf_altq_pl, PR_NOWAIT);
- #else
-@@ -1134,7 +1134,7 @@
- if (a2->qname[0] != 0) {
- if ((a2->qid = pf_qname2qid(a2->qname)) == 0) {
- error = EBUSY;
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_altq_pl, a2);
- #else
- pool_put(&pf_altq_pl, a2);
-@@ -1142,7 +1142,7 @@
+ err(1, "SIOCGIFMTU");
+--- a/src/sbin/pfctl/pfctl_optimize.c
++++ b/src/sbin/pfctl/pfctl_optimize.c
+@@ -862,7 +862,7 @@
break;
}
- a2->altq_disc = NULL;
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(a3, V_pf_altqs_inactive, entries) {
- #else
- TAILQ_FOREACH(a3, pf_altqs_inactive, entries) {
-@@ -1164,7 +1164,7 @@
- error = altq_add(a2);
- PF_LOCK();
-
--#ifdef __FreeBSD__
-+#if 1
- if (ticket != V_ticket_altqs_inactive)
- #else
- if (ticket != ticket_altqs_inactive)
-@@ -1172,7 +1172,7 @@
- error = EBUSY;
-
- if (error) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_altq_pl, a2);
- #else
- pool_put(&pf_altq_pl, a2);
-@@ -1181,7 +1181,7 @@
- }
}
-
-#ifdef __FreeBSD__
+#if 1
- TAILQ_INSERT_TAIL(V_pf_altqs_inactive, a2, entries);
+ if (por2 == NULL)
#else
- TAILQ_INSERT_TAIL(pf_altqs_inactive, a2, entries);
-@@ -1412,7 +1412,7 @@
- }
-
- MD5Final(digest, &ctx);
+ if (por2 == TAILQ_END(&block->sb_rules))
+--- a/src/sbin/pfctl/pfctl_parser.c
++++ b/src/sbin/pfctl/pfctl_parser.c
+@@ -580,7 +580,7 @@
+ s->src_nodes, "");
+ for (i = 0; i < SCNT_MAX; i++) {
+ printf(" %-25s %14lld ", pf_scounters[i],
-#ifdef __FreeBSD__
+#if 1
- memcpy(V_pf_status.pf_chksum, digest, sizeof(V_pf_status.pf_chksum));
+ (long long)s->scounters[i]);
#else
- memcpy(pf_status.pf_chksum, digest, sizeof(pf_status.pf_chksum));
-@@ -1440,7 +1440,7 @@
- }
-
- int
+ s->scounters[i]);
+@@ -606,7 +606,7 @@
+ printf("Limit Counters\n");
+ for (i = 0; i < LCNT_MAX; i++) {
+ printf(" %-25s %14lld ", pf_lcounters[i],
-#ifdef __FreeBSD__
+#if 1
- pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
+ (unsigned long long)s->lcounters[i]);
#else
- pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
-@@ -1448,7 +1448,7 @@
- {
- struct pf_pooladdr *pa = NULL;
- struct pf_pool *pool = NULL;
--#ifndef __FreeBSD__
-+#if 0
- int s;
- #endif
- int error = 0;
-@@ -1456,7 +1456,7 @@
- CURVNET_SET(TD_TO_VNET(td));
-
- /* XXX keep in sync with switch() below */
--#ifdef __FreeBSD__
-+#if 1
- if (securelevel_gt(td->td_ucred, 2))
- #else
- if (securelevel > 1)
-@@ -1496,7 +1496,7 @@
- case DIOCGETSRCNODES:
- case DIOCCLRSRCNODES:
- case DIOCIGETIFACES:
--#ifdef __FreeBSD__
-+#if 1
- case DIOCGIFSPEED:
- #endif
- case DIOCSETIFFLAG:
-@@ -1538,7 +1538,7 @@
- case DIOCOSFPGET:
- case DIOCGETSRCNODES:
- case DIOCIGETIFACES:
--#ifdef __FreeBSD__
-+#if 1
- case DIOCGIFSPEED:
- #endif
- break;
-@@ -1567,7 +1567,7 @@
+ s->lcounters[i]);
+@@ -655,7 +655,7 @@
+ sn->expire, min, sec);
}
-
- if (flags & FWRITE)
+ printf(", %llu pkts, %llu bytes",
-#ifdef __FreeBSD__
+#if 1
- sx_xlock(&V_pf_consistency_lock);
- else
- sx_slock(&V_pf_consistency_lock);
-@@ -1577,7 +1577,7 @@
- rw_enter_read(&pf_consistency_lock);
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
+ (unsigned long long)(sn->packets[0] + sn->packets[1]),
+ (unsigned long long)(sn->bytes[0] + sn->bytes[1]));
#else
- s = splsoftnet();
-@@ -1585,14 +1585,14 @@
- switch (cmd) {
-
- case DIOCSTART:
+@@ -1013,7 +1013,7 @@
+ if (r->rtableid != -1)
+ printf(" rtable %u", r->rtableid);
+ if (r->divert.port) {
-#ifdef __FreeBSD__
+#if 1
- if (V_pf_status.running)
+ printf(" divert-to %u", ntohs(r->divert.port));
#else
- if (pf_status.running)
- #endif
- error = EEXIST;
- else {
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- error = hook_pf();
- PF_LOCK();
-@@ -1622,7 +1622,7 @@
- break;
+ if (PF_AZERO(&r->divert.addr, r->af)) {
+--- a/src/sbin/pfctl/pfctl_qstats.c
++++ b/src/sbin/pfctl/pfctl_qstats.c
+@@ -89,7 +89,7 @@
+ struct pf_altq_node *root = NULL, *node;
+ int nodes, dotitle = (opts & PF_OPT_SHOWALL);
- case DIOCSTOP:
-#ifdef __FreeBSD__
+#if 1
- if (!V_pf_status.running)
- error = ENOENT;
- else {
-@@ -1670,7 +1670,7 @@
- break;
- }
- if (pr->ticket != ruleset->rules[rs_num].inactive.ticket) {
--#ifdef __FreeBSD__
-+#if 1
- DPFPRINTF(PF_DEBUG_MISC,
- ("ticket: %d != [%d]%d\n", pr->ticket, rs_num,
- ruleset->rules[rs_num].inactive.ticket));
-@@ -1678,7 +1678,7 @@
- error = EBUSY;
- break;
- }
--#ifdef __FreeBSD__
-+#if 1
- if (pr->pool_ticket != V_ticket_pabuf) {
- DPFPRINTF(PF_DEBUG_MISC,
- ("pool_ticket: %d != %d\n", pr->pool_ticket,
-@@ -1689,7 +1689,7 @@
- error = EBUSY;
- break;
- }
--#ifdef __FreeBSD__
-+#if 1
- rule = pool_get(&V_pf_rule_pl, PR_NOWAIT);
- #else
- rule = pool_get(&pf_rule_pl, PR_WAITOK|PR_LIMITFAIL);
-@@ -1699,7 +1699,7 @@
- break;
- }
- bcopy(&pr->rule, rule, sizeof(struct pf_rule));
--#ifdef __FreeBSD__
-+#if 1
- rule->cuid = td->td_ucred->cr_ruid;
- rule->cpid = td->td_proc ? td->td_proc->p_pid : 0;
- #else
-@@ -1715,7 +1715,7 @@
- rule->entries.tqe_prev = NULL;
- #ifndef INET
- if (rule->af == AF_INET) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_rule_pl, rule);
- #else
- pool_put(&pf_rule_pl, rule);
-@@ -1726,7 +1726,7 @@
- #endif /* INET */
- #ifndef INET6
- if (rule->af == AF_INET6) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_rule_pl, rule);
- #else
- pool_put(&pf_rule_pl, rule);
-@@ -1744,7 +1744,7 @@
- if (rule->ifname[0]) {
- rule->kif = pfi_kif_get(rule->ifname);
- if (rule->kif == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_rule_pl, rule);
- #else
- pool_put(&pf_rule_pl, rule);
-@@ -1755,7 +1755,7 @@
- pfi_kif_ref(rule->kif, PFI_KIF_REF_RULE);
- }
-
--#ifdef __FreeBSD__ /* ROUTING */
-+#if 1 /* ROUTING */
- if (rule->rtableid > 0 && rule->rtableid >= rt_numfibs)
- #else
- if (rule->rtableid > 0 && !rtable_exists(rule->rtableid))
-@@ -1799,7 +1799,7 @@
- error = EINVAL;
- if (pf_anchor_setup(rule, ruleset, pr->anchor_call))
- error = EINVAL;
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(pa, &V_pf_pabuf, entries)
- #else
- TAILQ_FOREACH(pa, &pf_pabuf, entries)
-@@ -1816,7 +1816,7 @@
- PFR_TFLAG_ACTIVE;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- pf_mv_pool(&V_pf_pabuf, &rule->rpool.list);
- #else
- pf_mv_pool(&pf_pabuf, &rule->rpool.list);
-@@ -1832,7 +1832,7 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (!V_debug_pfugidhack && (rule->uid.op || rule->gid.op ||
- rule->log & PF_LOG_SOCKET_LOOKUP)) {
- DPFPRINTF(PF_DEBUG_MISC,
-@@ -1936,7 +1936,7 @@
-
- if (!(pcr->action == PF_CHANGE_REMOVE ||
- pcr->action == PF_CHANGE_GET_TICKET) &&
--#ifdef __FreeBSD__
-+#if 1
- pcr->pool_ticket != V_ticket_pabuf) {
- #else
- pcr->pool_ticket != ticket_pabuf) {
-@@ -1977,7 +1977,7 @@
- }
-
- if (pcr->action != PF_CHANGE_REMOVE) {
--#ifdef __FreeBSD__
-+#if 1
- newrule = pool_get(&V_pf_rule_pl, PR_NOWAIT);
- #else
- newrule = pool_get(&pf_rule_pl, PR_WAITOK|PR_LIMITFAIL);
-@@ -1987,7 +1987,7 @@
- break;
- }
- bcopy(&pcr->rule, newrule, sizeof(struct pf_rule));
--#ifdef __FreeBSD__
-+#if 1
- newrule->cuid = td->td_ucred->cr_ruid;
- newrule->cpid = td->td_proc ? td->td_proc->p_pid : 0;
- #else
-@@ -2000,7 +2000,7 @@
- newrule->entries.tqe_prev = NULL;
- #ifndef INET
- if (newrule->af == AF_INET) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_rule_pl, newrule);
- #else
- pool_put(&pf_rule_pl, newrule);
-@@ -2011,7 +2011,7 @@
- #endif /* INET */
- #ifndef INET6
- if (newrule->af == AF_INET6) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_rule_pl, newrule);
- #else
- pool_put(&pf_rule_pl, newrule);
-@@ -2023,7 +2023,7 @@
- if (newrule->ifname[0]) {
- newrule->kif = pfi_kif_get(newrule->ifname);
- if (newrule->kif == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_rule_pl, newrule);
- #else
- pool_put(&pf_rule_pl, newrule);
-@@ -2036,7 +2036,7 @@
- newrule->kif = NULL;
-
- if (newrule->rtableid > 0 &&
--#ifdef __FreeBSD__ /* ROUTING */
-+#if 1 /* ROUTING */
- newrule->rtableid >= rt_numfibs)
- #else
- !rtable_exists(newrule->rtableid))
-@@ -2082,7 +2082,7 @@
- error = EINVAL;
- if (pf_anchor_setup(newrule, ruleset, pcr->anchor_call))
- error = EINVAL;
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(pa, &V_pf_pabuf, entries)
- #else
- TAILQ_FOREACH(pa, &pf_pabuf, entries)
-@@ -2100,7 +2100,7 @@
- PFR_TFLAG_ACTIVE;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- pf_mv_pool(&V_pf_pabuf, &newrule->rpool.list);
- #else
- pf_mv_pool(&pf_pabuf, &newrule->rpool.list);
-@@ -2118,7 +2118,7 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if (!V_debug_pfugidhack && (newrule->uid.op ||
- newrule->gid.op ||
- newrule->log & PF_LOG_SOCKET_LOOKUP)) {
-@@ -2133,7 +2133,7 @@
- newrule->packets[0] = newrule->packets[1] = 0;
- newrule->bytes[0] = newrule->bytes[1] = 0;
- }
--#ifdef __FreeBSD__
-+#if 1
- pf_empty_pool(&V_pf_pabuf);
- #else
- pf_empty_pool(&pf_pabuf);
-@@ -2194,7 +2194,7 @@
- struct pfioc_state_kill *psk = (struct pfioc_state_kill *)addr;
- u_int killed = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- for (s = RB_MIN(pf_state_tree_id, &V_tree_id); s; s = nexts) {
- nexts = RB_NEXT(pf_state_tree_id, &V_tree_id, s);
- #else
-@@ -2214,7 +2214,7 @@
- }
- psk->psk_killed = killed;
- #if NPFSYNC > 0
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_clear_states_ptr != NULL)
- pfsync_clear_states_ptr(V_pf_status.hostid, psk->psk_ifname);
- #else
-@@ -2234,7 +2234,7 @@
-
- if (psk->psk_pfcmp.id) {
- if (psk->psk_pfcmp.creatorid == 0)
--#ifdef __FreeBSD__
-+#if 1
- psk->psk_pfcmp.creatorid = V_pf_status.hostid;
- #else
- psk->psk_pfcmp.creatorid = pf_status.hostid;
-@@ -2246,7 +2246,7 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- for (s = RB_MIN(pf_state_tree_id, &V_tree_id); s;
- s = nexts) {
- nexts = RB_NEXT(pf_state_tree_id, &V_tree_id, s);
-@@ -2308,7 +2308,7 @@
- error = EINVAL;
- break;
- }
--#ifdef __FreeBSD__
-+#if 1
- if (pfsync_state_import_ptr != NULL)
- error = pfsync_state_import_ptr(sp, PFSYNC_SI_IOCTL);
- #else
-@@ -2342,7 +2342,7 @@
- u_int32_t nr = 0;
-
- if (ps->ps_len == 0) {
--#ifdef __FreeBSD__
-+#if 1
- nr = V_pf_status.states;
- #else
- nr = pf_status.states;
-@@ -2351,17 +2351,17 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
+ if (!altqsupport)
+ return (-1);
#endif
- pstore = malloc(sizeof(*pstore), M_TEMP, M_WAITOK);
+@@ -118,7 +118,7 @@
+ for (node = root; node != NULL; node = node->next) {
+ if (iface != NULL && strcmp(node->altq.ifname, iface))
+ continue;
-#ifdef __FreeBSD__
+#if 1
- PF_LOCK();
+ if (node->altq.local_flags & PFALTQ_FLAG_IF_REMOVED)
+ continue;
#endif
-
- p = ps->ps_states;
-
--#ifdef __FreeBSD__
-+#if 1
- state = TAILQ_FIRST(&V_state_list);
- #else
- state = TAILQ_FIRST(&state_list);
-@@ -2371,7 +2371,7 @@
- if ((nr+1) * sizeof(*p) > (unsigned)ps->ps_len)
- break;
- pfsync_state_export(pstore, state);
--#ifdef __FreeBSD__
-+#if 1
- PF_COPYOUT(pstore, p, sizeof(*p), error);
- #else
- error = copyout(pstore, p, sizeof(*p));
-@@ -2394,7 +2394,7 @@
-
- case DIOCGETSTATUS: {
- struct pf_status *s = (struct pf_status *)addr;
--#ifdef __FreeBSD__
-+#if 1
- bcopy(&V_pf_status, s, sizeof(struct pf_status));
- #else
- bcopy(&pf_status, s, sizeof(struct pf_status));
-@@ -2407,14 +2407,14 @@
- struct pfioc_if *pi = (struct pfioc_if *)addr;
-
- if (pi->ifname[0] == 0) {
--#ifdef __FreeBSD__
-+#if 1
- bzero(V_pf_status.ifname, IFNAMSIZ);
- #else
- bzero(pf_status.ifname, IFNAMSIZ);
- #endif
- break;
+@@ -161,7 +161,7 @@
+ warn("DIOCGETALTQ");
+ return (-1);
}
-#ifdef __FreeBSD__
+#if 1
- strlcpy(V_pf_status.ifname, pi->ifname, IFNAMSIZ);
+ if (pa.altq.qid > 0 &&
+ !(pa.altq.local_flags & PFALTQ_FLAG_IF_REMOVED)) {
#else
- strlcpy(pf_status.ifname, pi->ifname, IFNAMSIZ);
-@@ -2423,7 +2423,7 @@
- }
-
- case DIOCCLRSTATUS: {
--#ifdef __FreeBSD__
-+#if 1
- bzero(V_pf_status.counters, sizeof(V_pf_status.counters));
- bzero(V_pf_status.fcounters, sizeof(V_pf_status.fcounters));
- bzero(V_pf_status.scounters, sizeof(V_pf_status.scounters));
-@@ -2493,14 +2493,14 @@
- error = EINVAL;
- goto fail;
- }
--#ifdef __FreeBSD__
-+#if 1
- old = V_pf_default_rule.timeout[pt->timeout];
- #else
- old = pf_default_rule.timeout[pt->timeout];
- #endif
- if (pt->timeout == PFTM_INTERVAL && pt->seconds == 0)
- pt->seconds = 1;
--#ifdef __FreeBSD__
-+#if 1
- V_pf_default_rule.timeout[pt->timeout] = pt->seconds;
- #else
- pf_default_rule.timeout[pt->timeout] = pt->seconds;
-@@ -2518,7 +2518,7 @@
- error = EINVAL;
- goto fail;
- }
--#ifdef __FreeBSD__
-+#if 1
- pt->seconds = V_pf_default_rule.timeout[pt->timeout];
- #else
- pt->seconds = pf_default_rule.timeout[pt->timeout];
-@@ -2533,7 +2533,7 @@
- error = EINVAL;
- goto fail;
- }
--#ifdef __FreeBSD__
-+#if 1
- pl->limit = V_pf_pool_limits[pl->index].limit;
- #else
- pl->limit = pf_pool_limits[pl->index].limit;
-@@ -2546,7 +2546,7 @@
- int old_limit;
-
- if (pl->index < 0 || pl->index >= PF_LIMIT_MAX ||
--#ifdef __FreeBSD__
-+#if 1
- V_pf_pool_limits[pl->index].pp == NULL) {
- #else
- pf_pool_limits[pl->index].pp == NULL) {
-@@ -2554,7 +2554,7 @@
- error = EINVAL;
- goto fail;
- }
--#ifdef __FreeBSD__
-+#if 1
- uma_zone_set_max(V_pf_pool_limits[pl->index].pp, pl->limit);
- old_limit = V_pf_pool_limits[pl->index].limit;
- V_pf_pool_limits[pl->index].limit = pl->limit;
-@@ -2575,7 +2575,7 @@
- case DIOCSETDEBUG: {
- u_int32_t *level = (u_int32_t *)addr;
-
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.debug = *level;
- #else
- pf_status.debug = *level;
-@@ -2597,7 +2597,7 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- case DIOCGIFSPEED: {
- struct pf_ifspeed *psp = (struct pf_ifspeed *)addr;
- struct pf_ifspeed ps;
-@@ -2622,7 +2622,7 @@
- struct pf_altq *altq;
-
- /* enable all altq interfaces on active list */
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(altq, V_pf_altqs_active, entries) {
- if (altq->qname[0] == 0 && (altq->local_flags &
- PFALTQ_FLAG_IF_REMOVED) == 0) {
-@@ -2636,7 +2636,7 @@
+@@ -184,7 +184,7 @@
+ pfctl_insert_altq_node(root, pa.altq, qstats);
}
}
- if (error == 0)
-#ifdef __FreeBSD__
+#if 1
- V_pf_altq_running = 1;
- #else
- pf_altq_running = 1;
-@@ -2649,7 +2649,7 @@
- struct pf_altq *altq;
+ else if (pa.altq.local_flags & PFALTQ_FLAG_IF_REMOVED) {
+ memset(&qstats.data, 0, sizeof(qstats.data));
+ if ((node = pfctl_find_altq_node(*root, pa.altq.qname,
+@@ -303,7 +303,7 @@
+ if (a->altq.qid == 0)
+ return;
- /* disable all altq interfaces on active list */
-#ifdef __FreeBSD__
+#if 1
- TAILQ_FOREACH(altq, V_pf_altqs_active, entries) {
- if (altq->qname[0] == 0 && (altq->local_flags &
- PFALTQ_FLAG_IF_REMOVED) == 0) {
-@@ -2663,7 +2663,7 @@
- }
- }
- if (error == 0)
--#ifdef __FreeBSD__
-+#if 1
- V_pf_altq_running = 0;
- #else
- pf_altq_running = 0;
-@@ -2676,7 +2676,7 @@
- struct pfioc_altq *pa = (struct pfioc_altq *)addr;
- struct pf_altq *altq, *a;
-
--#ifdef __FreeBSD__
-+#if 1
- if (pa->ticket != V_ticket_altqs_inactive) {
- #else
- if (pa->ticket != ticket_altqs_inactive) {
-@@ -2684,7 +2684,7 @@
- error = EBUSY;
- break;
- }
--#ifdef __FreeBSD__
-+#if 1
- altq = pool_get(&V_pf_altq_pl, PR_NOWAIT);
- #else
- altq = pool_get(&pf_altq_pl, PR_WAITOK|PR_LIMITFAIL);
-@@ -2694,7 +2694,7 @@
- break;
- }
- bcopy(&pa->altq, altq, sizeof(struct pf_altq));
--#ifdef __FreeBSD__
-+#if 1
- altq->local_flags = 0;
+ if (a->altq.local_flags & PFALTQ_FLAG_IF_REMOVED)
+ return;
#endif
-
-@@ -2705,7 +2705,7 @@
- if (altq->qname[0] != 0) {
- if ((altq->qid = pf_qname2qid(altq->qname)) == 0) {
- error = EBUSY;
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_altq_pl, altq);
- #else
- pool_put(&pf_altq_pl, altq);
-@@ -2713,7 +2713,7 @@
- break;
- }
- altq->altq_disc = NULL;
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(a, V_pf_altqs_inactive, entries) {
- #else
- TAILQ_FOREACH(a, pf_altqs_inactive, entries) {
-@@ -2726,7 +2726,7 @@
- }
- }
-
--#ifdef __FreeBSD__
-+#if 1
- struct ifnet *ifp;
-
- if ((ifp = ifunit(altq->ifname)) == NULL) {
-@@ -2735,12 +2735,12 @@
- PF_UNLOCK();
- #endif
- error = altq_add(altq);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- }
- #endif
- if (error) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_altq_pl, altq);
- #else
- pool_put(&pf_altq_pl, altq);
-@@ -2748,7 +2748,7 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_INSERT_TAIL(V_pf_altqs_inactive, altq, entries);
- #else
- TAILQ_INSERT_TAIL(pf_altqs_inactive, altq, entries);
-@@ -2762,7 +2762,7 @@
- struct pf_altq *altq;
-
- pa->nr = 0;
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_FOREACH(altq, V_pf_altqs_active, entries)
- pa->nr++;
- pa->ticket = V_ticket_altqs_active;
-@@ -2779,7 +2779,7 @@
- struct pf_altq *altq;
- u_int32_t nr;
-
--#ifdef __FreeBSD__
-+#if 1
- if (pa->ticket != V_ticket_altqs_active) {
- #else
- if (pa->ticket != ticket_altqs_active) {
-@@ -2788,7 +2788,7 @@
- break;
- }
- nr = 0;
--#ifdef __FreeBSD__
-+#if 1
- altq = TAILQ_FIRST(V_pf_altqs_active);
- #else
- altq = TAILQ_FIRST(pf_altqs_active);
-@@ -2816,7 +2816,7 @@
- u_int32_t nr;
- int nbytes;
-
--#ifdef __FreeBSD__
-+#if 1
- if (pq->ticket != V_ticket_altqs_active) {
- #else
- if (pq->ticket != ticket_altqs_active) {
-@@ -2826,7 +2826,7 @@
- }
- nbytes = pq->nbytes;
- nr = 0;
--#ifdef __FreeBSD__
-+#if 1
- altq = TAILQ_FIRST(V_pf_altqs_active);
- #else
- altq = TAILQ_FIRST(pf_altqs_active);
-@@ -2840,7 +2840,7 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- if ((altq->local_flags & PFALTQ_FLAG_IF_REMOVED) != 0) {
- error = ENXIO;
- break;
-@@ -2848,7 +2848,7 @@
- PF_UNLOCK();
- #endif
- error = altq_getqstats(altq, pq->buf, &nbytes);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- if (error == 0) {
-@@ -2862,7 +2862,7 @@
- case DIOCBEGINADDRS: {
- struct pfioc_pooladdr *pp = (struct pfioc_pooladdr *)addr;
-
--#ifdef __FreeBSD__
-+#if 1
- pf_empty_pool(&V_pf_pabuf);
- pp->ticket = ++V_ticket_pabuf;
- #else
-@@ -2875,7 +2875,7 @@
- case DIOCADDADDR: {
- struct pfioc_pooladdr *pp = (struct pfioc_pooladdr *)addr;
-
--#ifdef __FreeBSD__
-+#if 1
- if (pp->ticket != V_ticket_pabuf) {
- #else
- if (pp->ticket != ticket_pabuf) {
-@@ -2901,7 +2901,7 @@
- error = EINVAL;
- break;
- }
--#ifdef __FreeBSD__
-+#if 1
- pa = pool_get(&V_pf_pooladdr_pl, PR_NOWAIT);
- #else
- pa = pool_get(&pf_pooladdr_pl, PR_WAITOK|PR_LIMITFAIL);
-@@ -2914,7 +2914,7 @@
- if (pa->ifname[0]) {
- pa->kif = pfi_kif_get(pa->ifname);
- if (pa->kif == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_pooladdr_pl, pa);
- #else
- pool_put(&pf_pooladdr_pl, pa);
-@@ -2927,7 +2927,7 @@
- if (pfi_dynaddr_setup(&pa->addr, pp->af)) {
- pfi_dynaddr_remove(&pa->addr);
- pfi_kif_unref(pa->kif, PFI_KIF_REF_RULE);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_pooladdr_pl, pa);
- #else
- pool_put(&pf_pooladdr_pl, pa);
-@@ -2935,7 +2935,7 @@
- error = EINVAL;
- break;
- }
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_INSERT_TAIL(&V_pf_pabuf, pa, entries);
- #else
- TAILQ_INSERT_TAIL(&pf_pabuf, pa, entries);
-@@ -3011,7 +3011,7 @@
- break;
- }
- if (pca->action != PF_CHANGE_REMOVE) {
--#ifdef __FreeBSD__
-+#if 1
- newpa = pool_get(&V_pf_pooladdr_pl,
- PR_NOWAIT);
- #else
-@@ -3025,7 +3025,7 @@
- bcopy(&pca->addr, newpa, sizeof(struct pf_pooladdr));
- #ifndef INET
- if (pca->af == AF_INET) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_pooladdr_pl, newpa);
- #else
- pool_put(&pf_pooladdr_pl, newpa);
-@@ -3036,7 +3036,7 @@
- #endif /* INET */
- #ifndef INET6
- if (pca->af == AF_INET6) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_pooladdr_pl, newpa);
- #else
- pool_put(&pf_pooladdr_pl, newpa);
-@@ -3048,7 +3048,7 @@
- if (newpa->ifname[0]) {
- newpa->kif = pfi_kif_get(newpa->ifname);
- if (newpa->kif == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_pooladdr_pl, newpa);
- #else
- pool_put(&pf_pooladdr_pl, newpa);
-@@ -3063,7 +3063,7 @@
- pf_tbladdr_setup(ruleset, &newpa->addr)) {
- pfi_dynaddr_remove(&newpa->addr);
- pfi_kif_unref(newpa->kif, PFI_KIF_REF_RULE);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_pooladdr_pl, newpa);
- #else
- pool_put(&pf_pooladdr_pl, newpa);
-@@ -3096,7 +3096,7 @@
- pfi_dynaddr_remove(&oldpa->addr);
- pf_tbladdr_remove(&oldpa->addr);
- pfi_kif_unref(oldpa->kif, PFI_KIF_REF_RULE);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_pooladdr_pl, oldpa);
- #else
- pool_put(&pf_pooladdr_pl, oldpa);
-@@ -3131,7 +3131,7 @@
- pr->nr = 0;
- if (ruleset->anchor == NULL) {
- /* XXX kludge for pf_main_ruleset */
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(anchor, pf_anchor_global, &V_pf_anchors)
- #else
- RB_FOREACH(anchor, pf_anchor_global, &pf_anchors)
-@@ -3160,7 +3160,7 @@
- pr->name[0] = 0;
- if (ruleset->anchor == NULL) {
- /* XXX kludge for pf_main_ruleset */
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(anchor, pf_anchor_global, &V_pf_anchors)
- #else
- RB_FOREACH(anchor, pf_anchor_global, &pf_anchors)
-@@ -3406,16 +3406,16 @@
- error = ENODEV;
- goto fail;
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK);
- table = malloc(sizeof(*table), M_TEMP, M_WAITOK);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < io->size; i++) {
--#ifdef __FreeBSD__
-+#if 1
- PF_COPYIN(io->array+i, ioe, sizeof(*ioe), error);
- if (error) {
- #else
-@@ -3462,7 +3462,7 @@
- }
- break;
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_COPYOUT(ioe, io->array+i, sizeof(io->array[i]),
- error);
- if (error) {
-@@ -3490,16 +3490,16 @@
- error = ENODEV;
- goto fail;
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK);
- table = malloc(sizeof(*table), M_TEMP, M_WAITOK);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- for (i = 0; i < io->size; i++) {
--#ifdef __FreeBSD__
-+#if 1
- PF_COPYIN(io->array+i, ioe, sizeof(*ioe), error);
- if (error) {
- #else
-@@ -3563,17 +3563,17 @@
- error = ENODEV;
- goto fail;
- }
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK);
- table = malloc(sizeof(*table), M_TEMP, M_WAITOK);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- /* first makes sure everything will succeed */
- for (i = 0; i < io->size; i++) {
--#ifdef __FreeBSD__
-+#if 1
- PF_COPYIN(io->array+i, ioe, sizeof(*ioe), error);
- if (error) {
- #else
-@@ -3593,7 +3593,7 @@
- error = EINVAL;
- goto fail;
- }
--#ifdef __FreeBSD__
-+#if 1
- if (!V_altqs_inactive_open || ioe->ticket !=
- V_ticket_altqs_inactive) {
- #else
-@@ -3640,7 +3640,7 @@
- }
- /* now do the commit - no errors should happen here */
- for (i = 0; i < io->size; i++) {
--#ifdef __FreeBSD__
-+#if 1
- PF_COPYIN(io->array+i, ioe, sizeof(*ioe), error);
- if (error) {
- #else
-@@ -3694,7 +3694,7 @@
- int space = psn->psn_len;
-
- if (space == 0) {
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(n, pf_src_tree, &V_tree_src_tracking)
- #else
- RB_FOREACH(n, pf_src_tree, &tree_src_tracking)
-@@ -3704,15 +3704,15 @@
- break;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
- #endif
- pstore = malloc(sizeof(*pstore), M_TEMP, M_WAITOK);
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK();
- #endif
- p = psn->psn_src_nodes;
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(n, pf_src_tree, &V_tree_src_tracking) {
- #else
- RB_FOREACH(n, pf_src_tree, &tree_src_tracking) {
-@@ -3740,7 +3740,7 @@
- n->conn_rate.count * diff /
- n->conn_rate.seconds;
-
--#ifdef __FreeBSD__
-+#if 1
- PF_COPYOUT(pstore, p, sizeof(*p), error);
- #else
- error = copyout(pstore, p, sizeof(*p));
-@@ -3762,7 +3762,7 @@
- struct pf_src_node *n;
- struct pf_state *state;
-
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(state, pf_state_tree_id, &V_tree_id) {
- #else
- RB_FOREACH(state, pf_state_tree_id, &tree_id) {
-@@ -3770,7 +3770,7 @@
- state->src_node = NULL;
- state->nat_src_node = NULL;
- }
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(n, pf_src_tree, &V_tree_src_tracking) {
- #else
- RB_FOREACH(n, pf_src_tree, &tree_src_tracking) {
-@@ -3779,7 +3779,7 @@
- n->states = 0;
- }
- pf_purge_expired_src_nodes(1);
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.src_nodes = 0;
- #else
- pf_status.src_nodes = 0;
-@@ -3794,7 +3794,7 @@
- (struct pfioc_src_node_kill *)addr;
- u_int killed = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(sn, pf_src_tree, &V_tree_src_tracking) {
- #else
- RB_FOREACH(sn, pf_src_tree, &tree_src_tracking) {
-@@ -3810,7 +3810,7 @@
- /* Handle state to src_node linkage */
- if (sn->states != 0) {
- RB_FOREACH(s, pf_state_tree_id,
--#ifdef __FreeBSD__
-+#if 1
- &V_tree_id) {
- #else
- &tree_id) {
-@@ -3837,7 +3837,7 @@
- case DIOCSETHOSTID: {
- u_int32_t *hostid = (u_int32_t *)addr;
-
--#ifdef __FreeBSD__
-+#if 1
- if (*hostid == 0)
- V_pf_status.hostid = arc4random();
- else
-@@ -3886,7 +3886,7 @@
- break;
- }
- fail:
--#ifdef __FreeBSD__
-+#if 1
- PF_UNLOCK();
-
- if (flags & FWRITE)
-@@ -3906,7 +3906,7 @@
- return (error);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- void
- pfsync_state_export(struct pfsync_state *sp, struct pf_state *st)
- {
-@@ -3976,7 +3976,7 @@
- {
- struct pf_state *state;
-
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(state, pf_state_tree_id, &V_tree_id) {
- #else
- RB_FOREACH(state, pf_state_tree_id, &tree_id) {
-@@ -4017,7 +4017,7 @@
- struct pf_src_node *n;
- struct pf_state *state;
-
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(state, pf_state_tree_id, &V_tree_id) {
- #else
- RB_FOREACH(state, pf_state_tree_id, &tree_id) {
-@@ -4025,7 +4025,7 @@
- state->src_node = NULL;
- state->nat_src_node = NULL;
- }
--#ifdef __FreeBSD__
-+#if 1
- RB_FOREACH(n, pf_src_tree, &V_tree_src_tracking) {
- #else
- RB_FOREACH(n, pf_src_tree, &tree_src_tracking) {
---- a/src/sys/contrib/pf/net/pf_lb.c
-+++ b/src/sys/contrib/pf/net/pf_lb.c
-@@ -35,7 +35,7 @@
- *
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #include "opt_inet.h"
- #include "opt_inet6.h"
-
-@@ -43,7 +43,7 @@
- __FBSDID("$FreeBSD$");
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #include "opt_bpf.h"
- #include "opt_pf.h"
-
-@@ -86,14 +86,14 @@
- #include <sys/socketvar.h>
- #include <sys/kernel.h>
- #include <sys/time.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/sysctl.h>
- #endif
--#ifndef __FreeBSD__
-+#if 0
- #include <sys/pool.h>
- #endif
- #include <sys/proc.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/kthread.h>
- #include <sys/lock.h>
- #include <sys/sx.h>
-@@ -101,7 +101,7 @@
- #include <sys/rwlock.h>
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/md5.h>
- #else
- #include <crypto/md5.h>
-@@ -129,7 +129,7 @@
- #include <netinet/icmp_var.h>
- #include <netinet/if_ether.h>
-
--#ifndef __FreeBSD__
-+#if 0
- #include <dev/rndvar.h>
- #endif
- #include <net/pfvar.h>
-@@ -148,7 +148,7 @@
- #endif /* INET6 */
-
-
--#ifdef __FreeBSD__
-+#if 1
- #define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x
- #else
- #define DPFPRINTF(n, x) if (pf_status.debug >= (n)) printf x
-@@ -279,7 +279,7 @@
- !pf_match_port(dst->port_op, dst->port[0],
- dst->port[1], dport))
- r = r->skip[PF_SKIP_DST_PORT].ptr;
--#ifdef __FreeBSD__
-+#if 1
- else if (r->match_tag && !pf_match_tag(m, r, &tag, pd->pf_mtag))
- #else
- else if (r->match_tag && !pf_match_tag(m, r, &tag))
-@@ -304,7 +304,7 @@
- pf_step_out_of_anchor(&asd, &ruleset, rs_num, &r,
- NULL, NULL);
- }
--#ifdef __FreeBSD__
-+#if 1
- if (pf_tag_packet(m, tag, rtableid, pd->pf_mtag))
- #else
- if (pf_tag_packet(m, tag, rtableid))
-@@ -370,7 +370,7 @@
- high = tmp;
- }
- /* low < high */
--#ifdef __FreeBSD__
-+#if 1
- cut = htonl(arc4random()) % (1 + high - low) + low;
- #else
- cut = arc4random_uniform(1 + high - low) + low;
-@@ -379,7 +379,7 @@
- for (tmp = cut; tmp <= high; ++(tmp)) {
- key.port[0] = htons(tmp);
- if (pf_find_state_all(&key, PF_IN, NULL) ==
--#ifdef __FreeBSD__
-+#if 1
- NULL) {
- #else
- NULL && !in_baddynamic(tmp, proto)) {
-@@ -391,7 +391,7 @@
- for (tmp = cut - 1; tmp >= low; --(tmp)) {
- key.port[0] = htons(tmp);
- if (pf_find_state_all(&key, PF_IN, NULL) ==
--#ifdef __FreeBSD__
-+#if 1
- NULL) {
- #else
- NULL && !in_baddynamic(tmp, proto)) {
-@@ -438,7 +438,7 @@
- k.rule.ptr = r;
- else
- k.rule.ptr = NULL;
--#ifdef __FreeBSD__
-+#if 1
- V_pf_status.scounters[SCNT_SRC_NODE_SEARCH]++;
- *sn = RB_FIND(pf_src_tree, &V_tree_src_tracking, &k);
- #else
-@@ -447,7 +447,7 @@
- #endif
- if (*sn != NULL && !PF_AZERO(&(*sn)->raddr, af)) {
- PF_ACPY(naddr, &(*sn)->raddr, af);
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -598,7 +598,7 @@
- if (*sn != NULL)
- PF_ACPY(&(*sn)->raddr, naddr, af);
-
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC &&
- #else
- if (pf_status.debug >= PF_DEBUG_MISC &&
-@@ -776,7 +776,7 @@
- * Pretend there was no match.
- */
- if (!bcmp(*skp, *nkp, sizeof(struct pf_state_key_cmp))) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_state_key_pl, *nkp);
- pool_put(&V_pf_state_key_pl, *skp);
- #else
---- a/src/sys/contrib/pf/net/pf_norm.c
-+++ b/src/sys/contrib/pf/net/pf_norm.c
-@@ -25,7 +25,7 @@
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #include "opt_inet.h"
- #include "opt_inet6.h"
- #include "opt_pf.h"
-@@ -50,7 +50,7 @@
- #include <sys/socket.h>
- #include <sys/kernel.h>
- #include <sys/time.h>
--#ifndef __FreeBSD__
-+#if 0
- #include <sys/pool.h>
-
- #include <dev/rndvar.h>
-@@ -77,7 +77,7 @@
-
- #include <net/pfvar.h>
-
--#ifndef __FreeBSD__
-+#if 0
- struct pf_frent {
- LIST_ENTRY(pf_frent) fr_next;
- struct ip *fr_ip;
-@@ -96,7 +96,7 @@
- #define PFFRAG_DROP 0x0004 /* Drop all fragments */
- #define BUFFER_FRAGMENTS(fr) (!((fr)->fr_flags & PFFRAG_NOBUFFER))
-
--#ifndef __FreeBSD__
-+#if 0
- struct pf_fragment {
- RB_ENTRY(pf_fragment) fr_entry;
- TAILQ_ENTRY(pf_fragment) frag_next;
-@@ -116,7 +116,7 @@
- };
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_HEAD(pf_fragqueue, pf_fragment);
- TAILQ_HEAD(pf_cachequeue, pf_fragment);
- VNET_DEFINE(struct pf_fragqueue, pf_fragqueue);
-@@ -128,7 +128,7 @@
- TAILQ_HEAD(pf_cachequeue, pf_fragment) pf_cachequeue;
- #endif
-
--#ifndef __FreeBSD__
-+#if 0
- static __inline int pf_frag_compare(struct pf_fragment *,
- struct pf_fragment *);
- #else
-@@ -136,7 +136,7 @@
- struct pf_fragment *);
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- RB_HEAD(pf_frag_tree, pf_fragment);
- VNET_DEFINE(struct pf_frag_tree, pf_frag_tree);
- #define V_pf_frag_tree VNET(pf_frag_tree)
-@@ -165,7 +165,7 @@
- #ifdef INET6
- void pf_scrub_ip6(struct mbuf **, u_int8_t);
- #endif
--#ifdef __FreeBSD__
-+#if 1
- #define DPFPRINTF(x) do { \
- if (V_pf_status.debug >= PF_DEBUG_MISC) { \
- printf("%s: ", __func__); \
-@@ -182,7 +182,7 @@
- #endif
-
- /* Globals */
--#ifdef __FreeBSD__
-+#if 1
- VNET_DEFINE(uma_zone_t, pf_frent_pl);
- VNET_DEFINE(uma_zone_t, pf_frag_pl);
- VNET_DEFINE(uma_zone_t, pf_cache_pl);
-@@ -202,7 +202,7 @@
- void
- pf_normalize_init(void)
- {
--#ifdef __FreeBSD__
-+#if 1
- /*
- * XXX
- * No high water mark support(It's hint not hard limit).
-@@ -229,7 +229,7 @@
- pool_sethardlimit(&pf_cent_pl, PFFRAG_FRCENT_HIWAT, NULL, 0);
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_INIT(&V_pf_fragqueue);
- TAILQ_INIT(&V_pf_cachequeue);
- #else
-@@ -238,7 +238,7 @@
- #endif
- }
-
--#ifdef __FreeBSD__
-+#if 1
- static int
- #else
- static __inline int
-@@ -266,7 +266,7 @@
- pf_purge_expired_fragments(void)
- {
- struct pf_fragment *frag;
--#ifdef __FreeBSD__
-+#if 1
- u_int32_t expire = time_second -
- V_pf_default_rule.timeout[PFTM_FRAG];
- #else
-@@ -274,7 +274,7 @@
- pf_default_rule.timeout[PFTM_FRAG];
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- while ((frag = TAILQ_LAST(&V_pf_fragqueue, pf_fragqueue)) != NULL) {
- KASSERT((BUFFER_FRAGMENTS(frag)),
- ("BUFFER_FRAGMENTS(frag) == 0: %s", __FUNCTION__));
-@@ -289,7 +289,7 @@
- pf_free_fragment(frag);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- while ((frag = TAILQ_LAST(&V_pf_cachequeue, pf_cachequeue)) != NULL) {
- KASSERT((!BUFFER_FRAGMENTS(frag)),
- ("BUFFER_FRAGMENTS(frag) != 0: %s", __FUNCTION__));
-@@ -302,7 +302,7 @@
-
- DPFPRINTF(("expiring %d(%p)\n", frag->fr_id, frag));
- pf_free_fragment(frag);
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((TAILQ_EMPTY(&V_pf_cachequeue) ||
- TAILQ_LAST(&V_pf_cachequeue, pf_cachequeue) != frag),
- ("!(TAILQ_EMPTY() || TAILQ_LAST() == farg): %s",
-@@ -324,7 +324,7 @@
- struct pf_fragment *frag;
- int goal;
-
--#ifdef __FreeBSD__
-+#if 1
- goal = V_pf_nfrents * 9 / 10;
- DPFPRINTF(("trying to free > %d frents\n",
- V_pf_nfrents - goal));
-@@ -335,7 +335,7 @@
- pf_nfrents - goal));
- while (goal < pf_nfrents) {
- #endif
--#ifdef __FreeBSD__
-+#if 1
- frag = TAILQ_LAST(&V_pf_fragqueue, pf_fragqueue);
- #else
- frag = TAILQ_LAST(&pf_fragqueue, pf_fragqueue);
-@@ -346,7 +346,7 @@
- }
-
-
--#ifdef __FreeBSD__
-+#if 1
- goal = V_pf_ncache * 9 / 10;
- DPFPRINTF(("trying to free > %d cache entries\n",
- V_pf_ncache - goal));
-@@ -357,7 +357,7 @@
- pf_ncache - goal));
- while (goal < pf_ncache) {
- #endif
--#ifdef __FreeBSD__
-+#if 1
- frag = TAILQ_LAST(&V_pf_cachequeue, pf_cachequeue);
- #else
- frag = TAILQ_LAST(&pf_cachequeue, pf_cachequeue);
-@@ -383,7 +383,7 @@
- LIST_REMOVE(frent, fr_next);
-
- m_freem(frent->fr_m);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_frent_pl, frent);
- V_pf_nfrents--;
- #else
-@@ -396,7 +396,7 @@
- frcache = LIST_FIRST(&frag->fr_cache)) {
- LIST_REMOVE(frcache, fr_next);
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((LIST_EMPTY(&frag->fr_cache) ||
- LIST_FIRST(&frag->fr_cache)->fr_off >
- frcache->fr_end),
-@@ -441,7 +441,7 @@
- /* XXX Are we sure we want to update the timeout? */
- frag->fr_timeout = time_second;
- if (BUFFER_FRAGMENTS(frag)) {
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_REMOVE(&V_pf_fragqueue, frag, frag_next);
- TAILQ_INSERT_HEAD(&V_pf_fragqueue, frag, frag_next);
- #else
-@@ -449,7 +449,7 @@
- TAILQ_INSERT_HEAD(&pf_fragqueue, frag, frag_next);
- #endif
- } else {
--#ifdef __FreeBSD__
-+#if 1
- TAILQ_REMOVE(&V_pf_cachequeue, frag, frag_next);
- TAILQ_INSERT_HEAD(&V_pf_cachequeue, frag, frag_next);
- #else
-@@ -468,7 +468,7 @@
- pf_remove_fragment(struct pf_fragment *frag)
- {
- if (BUFFER_FRAGMENTS(frag)) {
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_frag_tree, &V_pf_frag_tree, frag);
- TAILQ_REMOVE(&V_pf_fragqueue, frag, frag_next);
- pool_put(&V_pf_frag_pl, frag);
-@@ -478,7 +478,7 @@
- pool_put(&pf_frag_pl, frag);
- #endif
- } else {
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_frag_tree, &V_pf_cache_tree, frag);
- TAILQ_REMOVE(&V_pf_cachequeue, frag, frag_next);
- pool_put(&V_pf_cache_pl, frag);
-@@ -504,7 +504,7 @@
- u_int16_t ip_len = ntohs(ip->ip_len) - ip->ip_hl * 4;
- u_int16_t max = ip_len + off;
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((*frag == NULL || BUFFER_FRAGMENTS(*frag)),
- ("! (*frag == NULL || BUFFER_FRAGMENTS(*frag)): %s", __FUNCTION__));
- #else
-@@ -517,14 +517,14 @@
-
- /* Create a new reassembly queue for this packet */
- if (*frag == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- *frag = pool_get(&V_pf_frag_pl, PR_NOWAIT);
- #else
- *frag = pool_get(&pf_frag_pl, PR_NOWAIT);
- #endif
- if (*frag == NULL) {
- pf_flush_fragments();
--#ifdef __FreeBSD__
-+#if 1
- *frag = pool_get(&V_pf_frag_pl, PR_NOWAIT);
- #else
- *frag = pool_get(&pf_frag_pl, PR_NOWAIT);
-@@ -542,7 +542,7 @@
- (*frag)->fr_timeout = time_second;
- LIST_INIT(&(*frag)->fr_queue);
-
--#ifdef __FreeBSD__
-+#if 1
- RB_INSERT(pf_frag_tree, &V_pf_frag_tree, *frag);
- TAILQ_INSERT_HEAD(&V_pf_fragqueue, *frag, frag_next);
- #else
-@@ -565,7 +565,7 @@
- frep = frea;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((frep != NULL || frea != NULL),
- ("!(frep != NULL || frea != NULL): %s", __FUNCTION__));;
- #else
-@@ -613,7 +613,7 @@
- next = LIST_NEXT(frea, fr_next);
- m_freem(frea->fr_m);
- LIST_REMOVE(frea, fr_next);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_frent_pl, frea);
- V_pf_nfrents--;
- #else
-@@ -660,7 +660,7 @@
-
- /* We have all the data */
- frent = LIST_FIRST(&(*frag)->fr_queue);
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((frent != NULL), ("frent == NULL: %s", __FUNCTION__));
- #else
- KASSERT(frent != NULL);
-@@ -679,7 +679,7 @@
- m2 = m->m_next;
- m->m_next = NULL;
- m_cat(m, m2);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_frent_pl, frent);
- V_pf_nfrents--;
- #else
-@@ -690,21 +690,21 @@
- next = LIST_NEXT(frent, fr_next);
-
- m2 = frent->fr_m;
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_frent_pl, frent);
- V_pf_nfrents--;
- #else
- pool_put(&pf_frent_pl, frent);
- pf_nfrents--;
- #endif
--#ifdef __FreeBSD__
-+#if 1
- m->m_pkthdr.csum_flags &= m2->m_pkthdr.csum_flags;
- m->m_pkthdr.csum_data += m2->m_pkthdr.csum_data;
- #endif
- m_cat(m, m2);
- }
-
--#ifdef __FreeBSD__
-+#if 1
- while (m->m_pkthdr.csum_data & 0xffff0000)
- m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0xffff) +
- (m->m_pkthdr.csum_data >> 16);
-@@ -735,7 +735,7 @@
-
- drop_fragment:
- /* Oops - fail safe - drop packet */
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_frent_pl, frent);
- V_pf_nfrents--;
- #else
-@@ -757,7 +757,7 @@
- u_int16_t max = ip_len + off;
- int hosed = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((*frag == NULL || !BUFFER_FRAGMENTS(*frag)),
- ("!(*frag == NULL || !BUFFER_FRAGMENTS(*frag)): %s", __FUNCTION__));
- #else
-@@ -766,14 +766,14 @@
-
- /* Create a new range queue for this packet */
- if (*frag == NULL) {
--#ifdef __FreeBSD__
-+#if 1
- *frag = pool_get(&V_pf_cache_pl, PR_NOWAIT);
- #else
- *frag = pool_get(&pf_cache_pl, PR_NOWAIT);
- #endif
- if (*frag == NULL) {
- pf_flush_fragments();
--#ifdef __FreeBSD__
-+#if 1
- *frag = pool_get(&V_pf_cache_pl, PR_NOWAIT);
- #else
- *frag = pool_get(&pf_cache_pl, PR_NOWAIT);
-@@ -783,7 +783,7 @@
- }
-
- /* Get an entry for the queue */
--#ifdef __FreeBSD__
-+#if 1
- cur = pool_get(&V_pf_cent_pl, PR_NOWAIT);
- if (cur == NULL) {
- pool_put(&V_pf_cache_pl, *frag);
-@@ -795,7 +795,7 @@
- *frag = NULL;
- goto no_mem;
- }
--#ifdef __FreeBSD__
-+#if 1
- V_pf_ncache++;
- #else
- pf_ncache++;
-@@ -814,7 +814,7 @@
- LIST_INIT(&(*frag)->fr_cache);
- LIST_INSERT_HEAD(&(*frag)->fr_cache, cur, fr_next);
-
--#ifdef __FreeBSD__
-+#if 1
- RB_INSERT(pf_frag_tree, &V_pf_cache_tree, *frag);
- TAILQ_INSERT_HEAD(&V_pf_cachequeue, *frag, frag_next);
- #else
-@@ -838,7 +838,7 @@
- frp = fra;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((frp != NULL || fra != NULL),
- ("!(frp != NULL || fra != NULL): %s", __FUNCTION__));
- #else
-@@ -885,14 +885,14 @@
- * than this mbuf magic. For my next trick,
- * I'll pull a rabbit out of my laptop.
- */
--#ifdef __FreeBSD__
-+#if 1
- *m0 = m_dup(m, M_DONTWAIT);
- #else
- *m0 = m_copym2(m, 0, h->ip_hl << 2, M_NOWAIT);
- #endif
- if (*m0 == NULL)
- goto no_mem;
--#ifdef __FreeBSD__
-+#if 1
- /* From KAME Project : We have missed this! */
- m_adj(*m0, (h->ip_hl << 2) -
- (*m0)->m_pkthdr.len);
-@@ -917,7 +917,7 @@
-
- h = mtod(m, struct ip *);
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(((int)m->m_len ==
- ntohs(h->ip_len) - precut),
- ("m->m_len != ntohs(h->ip_len) - precut: %s",
-@@ -939,14 +939,14 @@
- h->ip_id, -precut, frp->fr_off, frp->fr_end, off,
- max));
-
--#ifdef __FreeBSD__
-+#if 1
- cur = pool_get(&V_pf_cent_pl, PR_NOWAIT);
- #else
- cur = pool_get(&pf_cent_pl, PR_NOWAIT);
- #endif
- if (cur == NULL)
- goto no_mem;
--#ifdef __FreeBSD__
-+#if 1
- V_pf_ncache++;
- #else
- pf_ncache++;
-@@ -989,7 +989,7 @@
- m->m_pkthdr.len = plen;
- }
- h = mtod(m, struct ip *);
--#ifdef __FreeBSD__
-+#if 1
- KASSERT(((int)m->m_len == ntohs(h->ip_len) - aftercut),
- ("m->m_len != ntohs(h->ip_len) - aftercut: %s",
- __FUNCTION__));
-@@ -1007,14 +1007,14 @@
- h->ip_id, -aftercut, off, max, fra->fr_off,
- fra->fr_end));
-
--#ifdef __FreeBSD__
-+#if 1
- cur = pool_get(&V_pf_cent_pl, PR_NOWAIT);
- #else
- cur = pool_get(&pf_cent_pl, PR_NOWAIT);
- #endif
- if (cur == NULL)
- goto no_mem;
--#ifdef __FreeBSD__
-+#if 1
- V_pf_ncache++;
- #else
- pf_ncache++;
-@@ -1036,7 +1036,7 @@
- max, fra->fr_off, fra->fr_end));
- fra->fr_off = cur->fr_off;
- LIST_REMOVE(cur, fr_next);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_cent_pl, cur);
- V_pf_ncache--;
- #else
-@@ -1047,7 +1047,7 @@
-
- } else if (frp && fra->fr_off <= frp->fr_end) {
- /* Need to merge in a modified 'frp' */
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((cur == NULL), ("cur != NULL: %s",
- __FUNCTION__));
- #else
-@@ -1059,7 +1059,7 @@
- max, fra->fr_off, fra->fr_end));
- fra->fr_off = frp->fr_off;
- LIST_REMOVE(frp, fr_next);
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pf_cent_pl, frp);
- V_pf_ncache--;
- #else
-@@ -1169,7 +1169,7 @@
- (struct pf_addr *)&h->ip_dst.s_addr, AF_INET,
- r->dst.neg, NULL, M_GETFIB(m)))
- r = r->skip[PF_SKIP_DST_ADDR].ptr;
--#ifdef __FreeBSD__
-+#if 1
- else if (r->match_tag && !pf_match_tag(m, r, &tag, pd->pf_mtag))
- #else
- else if (r->match_tag && !pf_match_tag(m, r, &tag))
-@@ -1233,7 +1233,7 @@
- if ((r->rule_flag & (PFRULE_FRAGCROP|PFRULE_FRAGDROP)) == 0) {
- /* Fully buffer all of the fragments */
-
--#ifdef __FreeBSD__
-+#if 1
- frag = pf_find_fragment(h, &V_pf_frag_tree);
- #else
- frag = pf_find_fragment(h, &pf_frag_tree);
-@@ -1245,7 +1245,7 @@
- goto bad;
-
- /* Get an entry for the fragment queue */
--#ifdef __FreeBSD__
-+#if 1
- frent = pool_get(&V_pf_frent_pl, PR_NOWAIT);
- #else
- frent = pool_get(&pf_frent_pl, PR_NOWAIT);
-@@ -1254,7 +1254,7 @@
- REASON_SET(reason, PFRES_MEMORY);
- return (PF_DROP);
- }
--#ifdef __FreeBSD__
-+#if 1
- V_pf_nfrents++;
- #else
- pf_nfrents++;
-@@ -1289,7 +1289,7 @@
- /* non-buffering fragment cache (drops or masks overlaps) */
- int nomem = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- if (dir == PF_OUT && pd->pf_mtag->flags & PF_TAG_FRAGCACHE) {
- #else
- if (dir == PF_OUT && m->m_pkthdr.pf.flags & PF_TAG_FRAGCACHE) {
-@@ -1302,7 +1302,7 @@
- goto fragment_pass;
- }
-
--#ifdef __FreeBSD__
-+#if 1
- frag = pf_find_fragment(h, &V_pf_cache_tree);
- #else
- frag = pf_find_fragment(h, &pf_cache_tree);
-@@ -1337,7 +1337,7 @@
- }
- #endif
- if (dir == PF_IN)
--#ifdef __FreeBSD__
-+#if 1
- pd->pf_mtag->flags |= PF_TAG_FRAGCACHE;
- #else
- m->m_pkthdr.pf.flags |= PF_TAG_FRAGCACHE;
-@@ -1674,7 +1674,7 @@
-
- /* copy back packet headers if we sanitized */
- if (rewrite)
--#ifdef __FreeBSD__
-+#if 1
- m_copyback(m, off, sizeof(*th), (caddr_t)th);
- #else
- m_copyback(m, off, sizeof(*th), th);
-@@ -1697,7 +1697,7 @@
- u_int8_t hdr[60];
- u_int8_t *opt;
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((src->scrub == NULL),
- ("pf_normalize_tcp_init: src->scrub != NULL"));
-
-@@ -1782,7 +1782,7 @@
- void
- pf_normalize_tcp_cleanup(struct pf_state *state)
- {
--#ifdef __FreeBSD__
-+#if 1
- if (state->src.scrub)
- pool_put(&V_pf_state_scrub_pl, state->src.scrub);
- if (state->dst.scrub)
-@@ -1810,7 +1810,7 @@
- int copyback = 0;
- int got_ts = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- KASSERT((src->scrub || dst->scrub),
- ("pf_normalize_tcp_statefull: src->scrub && dst->scrub!"));
- #else
-@@ -1870,7 +1870,7 @@
-
- if (got_ts) {
- /* Huh? Multiple timestamps!? */
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -1943,7 +1943,7 @@
- if (src->scrub && (src->scrub->pfss_flags & PFSS_PAWS) &&
- (uptime.tv_sec - src->scrub->pfss_last.tv_sec > TS_MAX_IDLE ||
- time_second - state->creation > TS_MAX_CONN)) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -1957,7 +1957,7 @@
- }
- if (dst->scrub && (dst->scrub->pfss_flags & PFSS_PAWS) &&
- uptime.tv_sec - dst->scrub->pfss_last.tv_sec > TS_MAX_IDLE) {
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -2045,7 +2045,7 @@
- * this packet.
- */
- if ((ts_fudge = state->rule.ptr->timeout[PFTM_TS_DIFF]) == 0)
--#ifdef __FreeBSD__
-+#if 1
- ts_fudge = V_pf_default_rule.timeout[PFTM_TS_DIFF];
- #else
- ts_fudge = pf_default_rule.timeout[PFTM_TS_DIFF];
-@@ -2055,7 +2055,7 @@
- /* Calculate max ticks since the last timestamp */
- #define TS_MAXFREQ 1100 /* RFC max TS freq of 1Khz + 10% skew */
- #define TS_MICROSECS 1000000 /* microseconds per second */
--#ifdef __FreeBSD__
-+#if 1
- #ifndef timersub
- #define timersub(tvp, uvp, vvp) \
- do { \
-@@ -2092,7 +2092,7 @@
- tsval_from_last) ? '1' : ' ',
- SEQ_GT(tsecr, dst->scrub->pfss_tsval) ? '2' : ' ',
- SEQ_LT(tsecr, dst->scrub->pfss_tsval0)? '3' : ' '));
--#ifdef __FreeBSD__
-+#if 1
- DPFPRINTF((" tsval: %u tsecr: %u +ticks: %u "
- "idle: %jus %lums\n",
- tsval, tsecr, tsval_from_last,
-@@ -2114,7 +2114,7 @@
- "\n", dst->scrub->pfss_tsval,
- dst->scrub->pfss_tsecr, dst->scrub->pfss_tsval0));
- #endif
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -2166,7 +2166,7 @@
- * Hey! Someone tried to sneak a packet in. Or the
- * stack changed its RFC1323 behavior?!?!
- */
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC) {
- #else
- if (pf_status.debug >= PF_DEBUG_MISC) {
-@@ -2197,7 +2197,7 @@
- src->scrub->pfss_flags |= PFSS_DATA_TS;
- else {
- src->scrub->pfss_flags |= PFSS_DATA_NOTS;
--#ifdef __FreeBSD__
-+#if 1
- if (V_pf_status.debug >= PF_DEBUG_MISC && dst->scrub &&
- #else
- if (pf_status.debug >= PF_DEBUG_MISC && dst->scrub &&
-@@ -2255,7 +2255,7 @@
- int thoff;
- int opt, cnt, optlen = 0;
- int rewrite = 0;
--#ifdef __FreeBSD__
-+#if 1
- u_char opts[TCP_MAXOLEN];
- #else
- u_char opts[MAX_TCPOPTLEN];
---- a/src/sys/contrib/pf/net/pf_osfp.c
-+++ b/src/sys/contrib/pf/net/pf_osfp.c
-@@ -17,7 +17,7 @@
- *
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
- #endif
-@@ -26,7 +26,7 @@
- #include <sys/socket.h>
- #ifdef _KERNEL
- #include <sys/systm.h>
--#ifndef __FreeBSD__
-+#if 0
- #include <sys/pool.h>
- #endif
- #endif /* _KERNEL */
-@@ -47,7 +47,7 @@
-
-
- #ifdef _KERNEL
--#ifdef __FreeBSD__
-+#if 1
- #define DPFPRINTF(format, x...) \
- if (V_pf_status.debug >= PF_DEBUG_NOISY) \
- printf(format , ##x)
-@@ -56,7 +56,7 @@
- if (pf_status.debug >= PF_DEBUG_NOISY) \
- printf(format , ##x)
- #endif
--#ifdef __FreeBSD__
-+#if 1
- typedef uma_zone_t pool_t;
- #else
- typedef struct pool pool_t;
-@@ -76,7 +76,7 @@
- #define pool_put(pool, item) free(item)
- #define pool_init(pool, size, a, ao, f, m, p) (*(pool)) = (size)
-
--#ifdef __FreeBSD__
-+#if 1
- #define NTOHS(x) (x) = ntohs((u_int16_t)(x))
- #endif
-
-@@ -89,7 +89,7 @@
- #endif /* _KERNEL */
-
-
--#ifdef __FreeBSD__
-+#if 1
- SLIST_HEAD(pf_osfp_list, pf_os_fingerprint);
- VNET_DEFINE(struct pf_osfp_list, pf_osfp_list);
- #define V_pf_osfp_list VNET(pf_osfp_list)
-@@ -284,7 +284,7 @@
- (fp.fp_flags & PF_OSFP_WSCALE_DC) ? "*" : "",
- fp.fp_wscale);
-
--#ifdef __FreeBSD__
-+#if 1
- if ((fpresult = pf_osfp_find(&V_pf_osfp_list, &fp,
- #else
- if ((fpresult = pf_osfp_find(&pf_osfp_list, &fp,
-@@ -325,14 +325,14 @@
- }
-
- /* Initialize the OS fingerprint system */
--#ifdef __FreeBSD__
-+#if 1
- int
- #else
- void
- #endif
- pf_osfp_initialize(void)
- {
--#if defined(__FreeBSD__) && defined(_KERNEL)
-+#if 1 && defined(_KERNEL)
- int error = ENOMEM;
-
- do {
-@@ -351,7 +351,7 @@
- SLIST_INIT(&pf_osfp_list);
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #ifdef _KERNEL
- return (error);
- #else
-@@ -360,7 +360,7 @@
- #endif
- }
-
--#if defined(__FreeBSD__) && (_KERNEL)
-+#if 1 && (_KERNEL)
- void
- pf_osfp_cleanup(void)
- {
-@@ -377,7 +377,7 @@
- struct pf_os_fingerprint *fp;
- struct pf_osfp_entry *entry;
-
--#ifdef __FreeBSD__
-+#if 1
- while ((fp = SLIST_FIRST(&V_pf_osfp_list))) {
- SLIST_REMOVE_HEAD(&V_pf_osfp_list, fp_next);
- #else
-@@ -436,7 +436,7 @@
- fpioc->fp_os.fp_os);
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- if ((fp = pf_osfp_find_exact(&V_pf_osfp_list, &fpadd))) {
- #else
- if ((fp = pf_osfp_find_exact(&pf_osfp_list, &fpadd))) {
-@@ -446,7 +446,7 @@
- return (EEXIST);
- }
- if ((entry = pool_get(&pf_osfp_entry_pl,
--#ifdef __FreeBSD__
-+#if 1
- PR_NOWAIT)) == NULL)
- #else
- PR_WAITOK|PR_LIMITFAIL)) == NULL)
-@@ -454,7 +454,7 @@
- return (ENOMEM);
- } else {
- if ((fp = pool_get(&pf_osfp_pl,
--#ifdef __FreeBSD__
-+#if 1
- PR_NOWAIT)) == NULL)
- #else
- PR_WAITOK|PR_LIMITFAIL)) == NULL)
-@@ -471,7 +471,7 @@
- fp->fp_ttl = fpioc->fp_ttl;
- SLIST_INIT(&fp->fp_oses);
- if ((entry = pool_get(&pf_osfp_entry_pl,
--#ifdef __FreeBSD__
-+#if 1
- PR_NOWAIT)) == NULL) {
- #else
- PR_WAITOK|PR_LIMITFAIL)) == NULL) {
-@@ -479,7 +479,7 @@
- pool_put(&pf_osfp_pl, fp);
- return (ENOMEM);
- }
--#ifdef __FreeBSD__
-+#if 1
- pf_osfp_insert(&V_pf_osfp_list, fp);
- #else
- pf_osfp_insert(&pf_osfp_list, fp);
-@@ -625,7 +625,7 @@
-
-
- memset(fpioc, 0, sizeof(*fpioc));
--#ifdef __FreeBSD__
-+#if 1
- SLIST_FOREACH(fp, &V_pf_osfp_list, fp_next) {
- #else
- SLIST_FOREACH(fp, &pf_osfp_list, fp_next) {
-@@ -656,7 +656,7 @@
- {
- struct pf_os_fingerprint *f, *f2, find;
-
--#ifdef __FreeBSD__
-+#if 1
- SLIST_FOREACH(f, &V_pf_osfp_list, fp_next) {
- #else
- SLIST_FOREACH(f, &pf_osfp_list, fp_next) {
-@@ -672,7 +672,7 @@
- find.fp_wsize *= (find.fp_mss + 40);
- else if (f->fp_flags & PF_OSFP_WSIZE_MOD)
- find.fp_wsize *= 2;
--#ifdef __FreeBSD__
-+#if 1
- if (f != (f2 = pf_osfp_find(&V_pf_osfp_list, &find, 0))) {
- #else
- if (f != (f2 = pf_osfp_find(&pf_osfp_list, &find, 0))) {
---- a/src/sys/contrib/pf/net/pf_ruleset.c
-+++ b/src/sys/contrib/pf/net/pf_ruleset.c
-@@ -35,7 +35,7 @@
- *
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
- #endif
-@@ -61,7 +61,7 @@
-
-
- #ifdef _KERNEL
--#ifdef __FreeBSD__
-+#if 1
- #define DPFPRINTF(format, x...) \
- if (V_pf_status.debug >= PF_DEBUG_NOISY) \
- printf(format , ##x)
-@@ -70,7 +70,7 @@
- if (pf_status.debug >= PF_DEBUG_NOISY) \
- printf(format , ##x)
- #endif
--#ifdef __FreeBSD__
-+#if 1
- #define rs_malloc(x) malloc(x, M_TEMP, M_NOWAIT|M_ZERO)
- #else
- #define rs_malloc(x) malloc(x, M_TEMP, M_WAITOK|M_CANFAIL|M_ZERO)
-@@ -96,7 +96,7 @@
- #endif /* PFDEBUG */
- #endif /* _KERNEL */
-
--#if defined(__FreeBSD__) && !defined(_KERNEL)
-+#if 1 && !defined(_KERNEL)
- #undef V_pf_anchors
- #define V_pf_anchors pf_anchors
-
-@@ -104,7 +104,7 @@
- #define pf_main_ruleset pf_main_anchor.ruleset
- #endif
-
--#if defined(__FreeBSD__) && defined(_KERNEL)
-+#if 1 && defined(_KERNEL)
- VNET_DEFINE(struct pf_anchor_global, pf_anchors);
- VNET_DEFINE(struct pf_anchor, pf_main_anchor);
- #else
-@@ -178,7 +178,7 @@
- if (key == NULL)
- return (NULL);
- strlcpy(key->path, path, sizeof(key->path));
--#ifdef __FreeBSD__
-+#if 1
- found = RB_FIND(pf_anchor_global, &V_pf_anchors, key);
- #else
- found = RB_FIND(pf_anchor_global, &pf_anchors, key);
-@@ -208,7 +208,7 @@
- {
- char *p, *q, *r;
- struct pf_ruleset *ruleset;
--#ifdef __FreeBSD__
-+#if 1
- struct pf_anchor *anchor = NULL, *dup, *parent = NULL;
- #else
- struct pf_anchor *anchor, *dup, *parent = NULL;
-@@ -263,7 +263,7 @@
- strlcat(anchor->path, "/", sizeof(anchor->path));
- }
- strlcat(anchor->path, anchor->name, sizeof(anchor->path));
--#ifdef __FreeBSD__
-+#if 1
- if ((dup = RB_INSERT(pf_anchor_global, &V_pf_anchors, anchor)) !=
- #else
- if ((dup = RB_INSERT(pf_anchor_global, &pf_anchors, anchor)) !=
-@@ -284,7 +284,7 @@
- "RB_INSERT2 '%s' '%s' collides with "
- "'%s' '%s'\n", anchor->path, anchor->name,
- dup->path, dup->name);
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_anchor_global, &V_pf_anchors,
- #else
- RB_REMOVE(pf_anchor_global, &pf_anchors,
-@@ -324,7 +324,7 @@
- !TAILQ_EMPTY(ruleset->rules[i].inactive.ptr) ||
- ruleset->rules[i].inactive.open)
- return;
--#ifdef __FreeBSD__
-+#if 1
- RB_REMOVE(pf_anchor_global, &V_pf_anchors, ruleset->anchor);
- #else
- RB_REMOVE(pf_anchor_global, &pf_anchors, ruleset->anchor);
---- a/src/sys/contrib/pf/net/pf_table.c
-+++ b/src/sys/contrib/pf/net/pf_table.c
-@@ -30,7 +30,7 @@
- *
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #include "opt_inet.h"
- #include "opt_inet6.h"
-
-@@ -43,7 +43,7 @@
- #include <sys/socket.h>
- #include <sys/mbuf.h>
- #include <sys/kernel.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/malloc.h>
- #else
- #include <sys/pool.h>
-@@ -52,7 +52,7 @@
- #include <net/if.h>
- #include <net/route.h>
- #include <netinet/in.h>
--#ifndef __FreeBSD__
-+#if 0
- #include <netinet/ip_ipsp.h>
- #endif
- #include <net/pfvar.h>
-@@ -64,7 +64,7 @@
- return (EINVAL); \
- } while (0)
-
--#ifdef __FreeBSD__
-+#if 1
- static inline int
- _copyin(const void *uaddr, void *kaddr, size_t len)
- {
-@@ -175,7 +175,7 @@
-
- #define senderr(e) do { rv = (e); goto _bad; } while (0)
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DEFINE(uma_zone_t, pfr_ktable_pl);
- VNET_DEFINE(uma_zone_t, pfr_kentry_pl);
- VNET_DEFINE(uma_zone_t, pfr_kcounters_pl);
-@@ -254,7 +254,7 @@
- void
- pfr_initialize(void)
- {
--#ifndef __FreeBSD__
-+#if 0
- pool_init(&pfr_ktable_pl, sizeof(struct pfr_ktable), 0, 0, 0,
- "pfrktable", NULL);
- pool_init(&pfr_kentry_pl, sizeof(struct pfr_kentry), 0, 0, 0,
-@@ -660,13 +660,13 @@
- w.pfrw_addr = addr;
- w.pfrw_free = kt->pfrkt_cnt;
- w.pfrw_flags = flags;
--#ifdef __FreeBSD__
-+#if 1
- rv = kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
- #else
- rv = rn_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
- #endif
- if (!rv)
--#ifdef __FreeBSD__
-+#if 1
- rv = kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree,
- &w);
- #else
-@@ -713,13 +713,13 @@
- w.pfrw_flags = flags;
- if (flags & PFR_FLAG_ATOMIC)
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- rv = kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
- #else
- rv = rn_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
- #endif
- if (!rv)
--#ifdef __FreeBSD__
-+#if 1
- rv = kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree,
- &w);
- #else
-@@ -840,7 +840,7 @@
- w.pfrw_op = sweep ? PFRW_SWEEP : PFRW_ENQUEUE;
- w.pfrw_workq = workq;
- if (kt->pfrkt_ip4 != NULL)
--#ifdef __FreeBSD__
-+#if 1
- if (kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree,
- &w))
- #else
-@@ -848,7 +848,7 @@
- #endif
- printf("pfr_enqueue_addrs: IPv4 walktree failed.\n");
- if (kt->pfrkt_ip6 != NULL)
--#ifdef __FreeBSD__
-+#if 1
- if (kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree,
- &w))
- #else
-@@ -866,13 +866,13 @@
-
- bzero(&w, sizeof(w));
- w.pfrw_op = PFRW_MARK;
--#ifdef __FreeBSD__
-+#if 1
- if (kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w))
- #else
- if (rn_walktree(kt->pfrkt_ip4, pfr_walktree, &w))
- #endif
- printf("pfr_mark_addrs: IPv4 walktree failed.\n");
--#ifdef __FreeBSD__
-+#if 1
- if (kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w))
- #else
- if (rn_walktree(kt->pfrkt_ip6, pfr_walktree, &w))
-@@ -885,7 +885,7 @@
- pfr_lookup_addr(struct pfr_ktable *kt, struct pfr_addr *ad, int exact)
- {
- union sockaddr_union sa, mask;
--#ifdef __FreeBSD__
-+#if 1
- struct radix_node_head *head = NULL;
- #else
- struct radix_node_head *head;
-@@ -904,7 +904,7 @@
- if (ADDR_NETWORK(ad)) {
- pfr_prepare_network(&mask, ad->pfra_af, ad->pfra_net);
- s = splsoftnet(); /* rn_lookup makes use of globals */
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #endif
- ke = (struct pfr_kentry *)rn_lookup(&sa, &mask, head);
-@@ -926,7 +926,7 @@
- {
- struct pfr_kentry *ke;
-
--#ifdef __FreeBSD__
-+#if 1
- ke = pool_get(&V_pfr_kentry_pl, PR_NOWAIT | PR_ZERO);
- #else
- if (intr)
-@@ -962,7 +962,7 @@
- pfr_destroy_kentry(struct pfr_kentry *ke)
- {
- if (ke->pfrke_counters)
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pfr_kcounters_pl, ke->pfrke_counters);
- pool_put(&V_pfr_kentry_pl, ke);
- #else
-@@ -1050,7 +1050,7 @@
- if (negchange)
- p->pfrke_not = !p->pfrke_not;
- if (p->pfrke_counters) {
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pfr_kcounters_pl, p->pfrke_counters);
- #else
- pool_put(&pfr_kcounters_pl, p->pfrke_counters);
-@@ -1107,7 +1107,7 @@
- {
- union sockaddr_union mask;
- struct radix_node *rn;
--#ifdef __FreeBSD__
-+#if 1
- struct radix_node_head *head = NULL;
- #else
- struct radix_node_head *head;
-@@ -1121,18 +1121,18 @@
- head = kt->pfrkt_ip6;
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #endif
- if (KENTRY_NETWORK(ke)) {
- pfr_prepare_network(&mask, ke->pfrke_af, ke->pfrke_net);
--#ifdef __FreeBSD__
-+#if 1
- rn = rn_addroute(&ke->pfrke_sa, &mask, head, ke->pfrke_node);
- #else
- rn = rn_addroute(&ke->pfrke_sa, &mask, head, ke->pfrke_node, 0);
- #endif
- } else
--#ifdef __FreeBSD__
-+#if 1
- rn = rn_addroute(&ke->pfrke_sa, NULL, head, ke->pfrke_node);
- #else
- rn = rn_addroute(&ke->pfrke_sa, NULL, head, ke->pfrke_node, 0);
-@@ -1147,7 +1147,7 @@
- {
- union sockaddr_union mask;
- struct radix_node *rn;
--#ifdef __FreeBSD__
-+#if 1
- struct radix_node_head *head = NULL;
- #else
- struct radix_node_head *head;
-@@ -1160,18 +1160,18 @@
- head = kt->pfrkt_ip6;
-
- s = splsoftnet();
--#ifdef __FreeBSD__
-+#if 1
- PF_LOCK_ASSERT();
- #endif
- if (KENTRY_NETWORK(ke)) {
- pfr_prepare_network(&mask, ke->pfrke_af, ke->pfrke_net);
--#ifdef __FreeBSD__
-+#if 1
- rn = rn_delete(&ke->pfrke_sa, &mask, head);
- #else
- rn = rn_delete(&ke->pfrke_sa, &mask, head, NULL);
- #endif
- } else
--#ifdef __FreeBSD__
-+#if 1
- rn = rn_delete(&ke->pfrke_sa, NULL, head);
- #else
- rn = rn_delete(&ke->pfrke_sa, NULL, head, NULL);
-@@ -1266,7 +1266,7 @@
- if (ke->pfrke_af == AF_INET) {
- if (w->pfrw_dyn->pfid_acnt4++ > 0)
- break;
--#ifdef __FreeBSD__
-+#if 1
- pfr_prepare_network(&V_pfr_mask, AF_INET, ke->pfrke_net);
- #else
- pfr_prepare_network(&pfr_mask, AF_INET, ke->pfrke_net);
-@@ -1274,7 +1274,7 @@
- w->pfrw_dyn->pfid_addr4 = *SUNION2PF(
- &ke->pfrke_sa, AF_INET);
- w->pfrw_dyn->pfid_mask4 = *SUNION2PF(
--#ifdef __FreeBSD__
-+#if 1
- &V_pfr_mask, AF_INET);
- #else
- &pfr_mask, AF_INET);
-@@ -1282,7 +1282,7 @@
- } else if (ke->pfrke_af == AF_INET6){
- if (w->pfrw_dyn->pfid_acnt6++ > 0)
- break;
--#ifdef __FreeBSD__
-+#if 1
- pfr_prepare_network(&V_pfr_mask, AF_INET6, ke->pfrke_net);
- #else
- pfr_prepare_network(&pfr_mask, AF_INET6, ke->pfrke_net);
-@@ -1290,7 +1290,7 @@
- w->pfrw_dyn->pfid_addr6 = *SUNION2PF(
- &ke->pfrke_sa, AF_INET6);
- w->pfrw_dyn->pfid_mask6 = *SUNION2PF(
--#ifdef __FreeBSD__
-+#if 1
- &V_pfr_mask, AF_INET6);
- #else
- &pfr_mask, AF_INET6);
-@@ -2076,7 +2076,7 @@
- struct pfr_ktable *kt;
- struct pf_ruleset *rs;
-
--#ifdef __FreeBSD__
-+#if 1
- kt = pool_get(&V_pfr_ktable_pl, PR_NOWAIT|PR_ZERO);
- #else
- if (intr)
-@@ -2131,7 +2131,7 @@
- pfr_clean_node_mask(kt, &addrq);
- pfr_destroy_kentries(&addrq);
- }
--#if defined(__FreeBSD__) && (__FreeBSD_version >= 500100)
-+#if 1 && (__FreeBSD_version >= 500100)
- if (kt->pfrkt_ip4 != NULL) {
- RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip4);
- free((caddr_t)kt->pfrkt_ip4, M_RTABLE);
-@@ -2152,7 +2152,7 @@
- kt->pfrkt_rs->tables--;
- pf_remove_if_empty_ruleset(kt->pfrkt_rs);
- }
--#ifdef __FreeBSD__
-+#if 1
- pool_put(&V_pfr_ktable_pl, kt);
- #else
- pool_put(&pfr_ktable_pl, kt);
-@@ -2191,7 +2191,7 @@
- switch (af) {
- #ifdef INET
- case AF_INET:
--#ifdef __FreeBSD__
-+#if 1
- V_pfr_sin.sin_addr.s_addr = a->addr32[0];
- ke = (struct pfr_kentry *)rn_match(&V_pfr_sin, kt->pfrkt_ip4);
- #else
-@@ -2204,7 +2204,7 @@
- #endif /* INET */
- #ifdef INET6
- case AF_INET6:
--#ifdef __FreeBSD__
-+#if 1
- bcopy(a, &V_pfr_sin6.sin6_addr, sizeof(V_pfr_sin6.sin6_addr));
- ke = (struct pfr_kentry *)rn_match(&V_pfr_sin6, kt->pfrkt_ip6);
- #else
-@@ -2238,7 +2238,7 @@
- switch (af) {
- #ifdef INET
- case AF_INET:
--#ifdef __FreeBSD__
-+#if 1
- V_pfr_sin.sin_addr.s_addr = a->addr32[0];
- ke = (struct pfr_kentry *)rn_match(&V_pfr_sin, kt->pfrkt_ip4);
- #else
-@@ -2251,7 +2251,7 @@
- #endif /* INET */
- #ifdef INET6
- case AF_INET6:
--#ifdef __FreeBSD__
-+#if 1
- bcopy(a, &V_pfr_sin6.sin6_addr, sizeof(V_pfr_sin6.sin6_addr));
- ke = (struct pfr_kentry *)rn_match(&V_pfr_sin6, kt->pfrkt_ip6);
- #else
-@@ -2275,7 +2275,7 @@
- if (ke != NULL && op_pass != PFR_OP_XPASS &&
- (kt->pfrkt_flags & PFR_TFLAG_COUNTERS)) {
- if (ke->pfrke_counters == NULL)
--#ifdef __FreeBSD__
-+#if 1
- ke->pfrke_counters = pool_get(&V_pfr_kcounters_pl,
- #else
- ke->pfrke_counters = pool_get(&pfr_kcounters_pl,
-@@ -2338,7 +2338,7 @@
- pfr_pool_get(struct pfr_ktable *kt, int *pidx, struct pf_addr *counter,
- struct pf_addr **raddr, struct pf_addr **rmask, sa_family_t af)
- {
--#ifdef __FreeBSD__
-+#if 1
- struct pfr_kentry *ke, *ke2 = NULL;
- struct pf_addr *addr = NULL;
- #else
-@@ -2348,7 +2348,7 @@
- union sockaddr_union mask;
- int idx = -1, use_counter = 0;
-
--#ifdef __FreeBSD__
-+#if 1
- if (af == AF_INET)
- addr = (struct pf_addr *)&V_pfr_sin.sin_addr;
- else if (af == AF_INET6)
-@@ -2377,13 +2377,13 @@
- kt->pfrkt_nomatch++;
- return (1);
- }
--#ifdef __FreeBSD__
-+#if 1
- pfr_prepare_network(&V_pfr_mask, af, ke->pfrke_net);
- #else
- pfr_prepare_network(&pfr_mask, af, ke->pfrke_net);
- #endif
- *raddr = SUNION2PF(&ke->pfrke_sa, af);
--#ifdef __FreeBSD__
-+#if 1
- *rmask = SUNION2PF(&V_pfr_mask, af);
- #else
- *rmask = SUNION2PF(&pfr_mask, af);
-@@ -2412,7 +2412,7 @@
- }
- for (;;) {
- /* we don't want to use a nested block */
--#ifdef __FreeBSD__
-+#if 1
- if (af == AF_INET)
- ke2 = (struct pfr_kentry *)rn_match(&V_pfr_sin,
- kt->pfrkt_ip4);
-@@ -2438,7 +2438,7 @@
-
- /* we need to increase the counter past the nested block */
- pfr_prepare_network(&mask, AF_INET, ke2->pfrke_net);
--#ifdef __FreeBSD__
-+#if 1
- PF_POOLMASK(addr, addr, SUNION2PF(&mask, af), &V_pfr_ffaddr, af);
- #else
- PF_POOLMASK(addr, addr, SUNION2PF(&mask, af), &pfr_ffaddr, af);
-@@ -2466,7 +2466,7 @@
- switch (af) {
- #ifdef INET
- case AF_INET:
--#ifdef __FreeBSD__
-+#if 1
- kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
- #else
- rn_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
-@@ -2475,7 +2475,7 @@
- #endif /* INET */
- #ifdef INET6
- case AF_INET6:
--#ifdef __FreeBSD__
-+#if 1
- kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w);
- #else
- rn_walktree(kt->pfrkt_ip6, pfr_walktree, &w);
-@@ -2501,13 +2501,13 @@
- dyn->pfid_acnt4 = 0;
- dyn->pfid_acnt6 = 0;
- if (!dyn->pfid_af || dyn->pfid_af == AF_INET)
--#ifdef __FreeBSD__
-+#if 1
- kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
- #else
- rn_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
- #endif
- if (!dyn->pfid_af || dyn->pfid_af == AF_INET6)
--#ifdef __FreeBSD__
-+#if 1
- kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree, &w);
- #else
- rn_walktree(kt->pfrkt_ip6, pfr_walktree, &w);
---- a/src/sys/contrib/pf/net/pfvar.h
-+++ b/src/sys/contrib/pf/net/pfvar.h
-@@ -37,7 +37,7 @@
- #include <sys/types.h>
- #include <sys/queue.h>
- #include <sys/tree.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <sys/lock.h>
- #include <sys/sx.h>
- #else
-@@ -46,7 +46,7 @@
-
- #include <net/radix.h>
- #include <net/route.h>
--#ifdef __FreeBSD__
-+#if 1
- #include <net/if_clone.h>
- #include <net/pf_mtag.h>
- #include <vm/uma.h>
-@@ -54,7 +54,7 @@
- #include <netinet/ip_ipsp.h>
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- #include <netinet/in.h>
- #endif
-
-@@ -62,7 +62,7 @@
-
- struct ip;
- struct ip6_hdr;
--#ifdef __FreeBSD__
-+#if 1
- struct inpcb;
- #endif
-
-@@ -173,7 +173,7 @@
- } a;
- char ifname[IFNAMSIZ];
- char tblname[PF_TABLE_NAME_SIZE];
--#ifdef __FreeBSD__
-+#if 1
- #define RTLABEL_LEN 32
- #endif
- char rtlabelname[RTLABEL_LEN];
-@@ -211,7 +211,7 @@
- * Address manipulation macros
- */
-
--#ifdef __FreeBSD__
-+#if 1
- #define splsoftnet() splnet()
-
- #define HTONL(x) (x) = htonl((__uint32_t)(x))
-@@ -236,7 +236,7 @@
- if (var) \
- uma_zdestroy(var)
-
--#ifdef __FreeBSD__
-+#if 1
- extern struct mtx pf_task_mtx;
-
- #define PF_LOCK_ASSERT() mtx_assert(&pf_task_mtx, MA_OWNED)
-@@ -830,7 +830,7 @@
- u_int64_t id;
- u_int32_t creatorid;
- u_int8_t direction;
--#ifdef __FreeBSD__
-+#if 1
- u_int8_t pad[2];
- u_int8_t local_flags;
- #define PFSTATE_EXPIRING 0x01
-@@ -920,7 +920,7 @@
- sa_family_t af;
- u_int8_t proto;
- u_int8_t direction;
--#ifdef __FreeBSD__
-+#if 1
- u_int8_t local_flags;
- #define PFSTATE_EXPIRING 0x01
- u_int8_t pad;
-@@ -932,7 +932,7 @@
- u_int8_t updates;
- } __packed;
-
--#ifdef __FreeBSD__
-+#if 1
- #ifdef _KERNEL
- /* pfsync */
- typedef int pfsync_state_import_t(struct pfsync_state *, u_int8_t);
-@@ -1212,7 +1212,7 @@
- RB_HEAD(pfi_ifhead, pfi_kif);
-
- /* state tables */
--#ifdef __FreeBSD__
-+#if 1
- #ifdef _KERNEL
- VNET_DECLARE(struct pf_state_tree, pf_statetbl);
- #define V_pf_statetbl VNET(pf_statetbl)
-@@ -1274,7 +1274,7 @@
- struct pf_addr *dst; /* dst address */
- u_int16_t *sport;
- u_int16_t *dport;
--#ifdef __FreeBSD__
-+#if 1
- struct pf_mtag *pf_mtag;
- #endif
-
-@@ -1400,7 +1400,7 @@
- *(a) = (x); \
- } while (0)
-
--#ifdef __FreeBSD__
-+#if 1
- #define REASON_SET(a, x) \
- do { \
- if ((a) != NULL) \
-@@ -1485,7 +1485,7 @@
- u_int32_t parent_qid; /* parent queue id */
- u_int32_t bandwidth; /* queue bandwidth */
- u_int8_t priority; /* priority */
--#ifdef __FreeBSD__
-+#if 1
- u_int8_t local_flags; /* dynamic interface */
- #define PFALTQ_FLAG_IF_REMOVED 0x01
- #endif
-@@ -1765,7 +1765,7 @@
- #define DIOCSETIFFLAG _IOWR('D', 89, struct pfioc_iface)
- #define DIOCCLRIFFLAG _IOWR('D', 90, struct pfioc_iface)
- #define DIOCKILLSRCNODES _IOWR('D', 91, struct pfioc_src_node_kill)
--#ifdef __FreeBSD__
-+#if 1
- struct pf_ifspeed {
- char ifname[IFNAMSIZ];
- u_int32_t baudrate;
-@@ -1776,7 +1776,7 @@
- #ifdef _KERNEL
- RB_HEAD(pf_src_tree, pf_src_node);
- RB_PROTOTYPE(pf_src_tree, pf_src_node, entry, pf_src_compare);
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(struct pf_src_tree, tree_src_tracking);
- #define V_tree_src_tracking VNET(tree_src_tracking)
- #else
-@@ -1786,7 +1786,7 @@
- RB_HEAD(pf_state_tree_id, pf_state);
- RB_PROTOTYPE(pf_state_tree_id, pf_state,
- entry_id, pf_state_compare_id);
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(struct pf_state_tree_id, tree_id);
- #define V_tree_id VNET(tree_id)
- VNET_DECLARE(struct pf_state_queue, state_list);
-@@ -1797,14 +1797,14 @@
- #endif
-
- TAILQ_HEAD(pf_poolqueue, pf_pool);
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(struct pf_poolqueue, pf_pools[2]);
- #define V_pf_pools VNET(pf_pools)
- #else
- extern struct pf_poolqueue pf_pools[2];
- #endif
- TAILQ_HEAD(pf_altqqueue, pf_altq);
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(struct pf_altqqueue, pf_altqs[2]);
- #define V_pf_altqs VNET(pf_altqs)
- VNET_DECLARE(struct pf_palist, pf_pabuf);
-@@ -1814,7 +1814,7 @@
- extern struct pf_palist pf_pabuf;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(u_int32_t, ticket_altqs_active);
- #define V_ticket_altqs_active VNET(ticket_altqs_active)
- VNET_DECLARE(u_int32_t, ticket_altqs_inactive);
-@@ -1846,7 +1846,7 @@
- extern void pf_tbladdr_remove(struct pf_addr_wrap *);
- extern void pf_tbladdr_copyout(struct pf_addr_wrap *);
- extern void pf_calc_skip_steps(struct pf_rulequeue *);
--#ifdef __FreeBSD__
-+#if 1
- #ifdef ALTQ
- extern void pf_altq_ifnet_event(struct ifnet *, int);
- #endif
-@@ -1885,7 +1885,7 @@
- extern struct pool pf_state_scrub_pl;
- #endif
- extern void pf_purge_thread(void *);
--#ifdef __FreeBSD__
-+#if 1
- extern int pf_purge_expired_src_nodes(int);
- extern int pf_purge_expired_states(u_int32_t , int);
- #else
-@@ -1910,7 +1910,7 @@
- extern u_int16_t pf_cksum_fixup(u_int16_t, u_int16_t, u_int16_t,
- u_int8_t);
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(struct ifnet *, sync_ifp);
- #define V_sync_ifp VNET(sync_ifp);
- VNET_DECLARE(struct pf_rule, pf_default_rule);
-@@ -1923,12 +1923,12 @@
- u_int8_t);
- void pf_rm_rule(struct pf_rulequeue *,
- struct pf_rule *);
--#ifndef __FreeBSD__
-+#if 0
- struct pf_divert *pf_find_divert(struct mbuf *);
- #endif
-
- #ifdef INET
--#ifdef __FreeBSD__
-+#if 1
- int pf_test(int, struct ifnet *, struct mbuf **, struct ether_header *,
- struct inpcb *);
- #else
-@@ -1937,7 +1937,7 @@
- #endif /* INET */
-
- #ifdef INET6
--#ifdef __FreeBSD__
-+#if 1
- int pf_test6(int, struct ifnet *, struct mbuf **, struct ether_header *,
- struct inpcb *);
- #else
-@@ -1948,7 +1948,7 @@
- void pf_addr_inc(struct pf_addr *, sa_family_t);
- #endif /* INET6 */
-
--#ifdef __FreeBSD__
-+#if 1
- u_int32_t pf_new_isn(struct pf_state *);
- #endif
- void *pf_pull_hdr(struct mbuf *, int, void *, int, u_short *, u_short *,
-@@ -1987,7 +1987,7 @@
- int);
- int pf_rtlabel_match(struct pf_addr *, sa_family_t, struct pf_addr_wrap *,
- int);
--#ifdef __FreeBSD__
-+#if 1
- int pf_socket_lookup(int, struct pf_pdesc *, struct inpcb *);
- #else
- int pf_socket_lookup(int, struct pf_pdesc *);
-@@ -2032,7 +2032,7 @@
- int pfr_ina_define(struct pfr_table *, struct pfr_addr *, int, int *,
- int *, u_int32_t, int);
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(struct pfi_kif *, pfi_all);
- #define V_pfi_all VNET(pfi_all)
- #else
-@@ -2040,7 +2040,7 @@
- #endif
-
- void pfi_initialize(void);
--#ifdef __FreeBSD__
-+#if 1
- void pfi_cleanup(void);
- #endif
- struct pfi_kif *pfi_kif_get(const char *);
-@@ -2062,7 +2062,7 @@
- int pfi_set_flags(const char *, int);
- int pfi_clear_flags(const char *, int);
-
--#ifdef __FreeBSD__
-+#if 1
- int pf_match_tag(struct mbuf *, struct pf_rule *, int *,
- struct pf_mtag *);
- #else
-@@ -2072,7 +2072,7 @@
- void pf_tag2tagname(u_int16_t, char *);
- void pf_tag_ref(u_int16_t);
- void pf_tag_unref(u_int16_t);
--#ifdef __FreeBSD__
-+#if 1
- int pf_tag_packet(struct mbuf *, int, int, struct pf_mtag *);
- #else
- int pf_tag_packet(struct mbuf *, int, int);
-@@ -2081,14 +2081,14 @@
- void pf_qid2qname(u_int32_t, char *);
- void pf_qid_unref(u_int32_t);
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(struct pf_status, pf_status);
- #define V_pf_status VNET(pf_status)
- #else
- extern struct pf_status pf_status;
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(uma_zone_t, pf_frent_pl);
- #define V_pf_frent_pl VNET(pf_frent_pl)
- VNET_DECLARE(uma_zone_t, pf_frag_pl);
-@@ -2104,14 +2104,14 @@
- void *pp;
- unsigned limit;
- };
--#ifdef __FreeBSD__
-+#if 1
- VNET_DECLARE(struct pf_pool_limit, pf_pool_limits[PF_LIMIT_MAX]);
- #define V_pf_pool_limits VNET(pf_pool_limits)
- #else
- extern struct pf_pool_limit pf_pool_limits[PF_LIMIT_MAX];
- #endif
-
--#ifdef __FreeBSD__
-+#if 1
- struct pf_frent {
- LIST_ENTRY(pf_frent) fr_next;
- struct ip *fr_ip;
-@@ -2145,7 +2145,7 @@
-
- #endif /* _KERNEL */
-
--#ifdef __FreeBSD__
-+#if 1
- #ifdef _KERNEL
- VNET_DECLARE(struct pf_anchor_global, pf_anchors);
- #define V_pf_anchors VNET(pf_anchors)
-@@ -2173,7 +2173,7 @@
- struct pf_ruleset *pf_find_or_create_ruleset(const char *);
- void pf_rs_initialize(void);
-
--#ifndef __FreeBSD__
-+#if 0
- #ifdef _KERNEL
- int pf_anchor_copyout(const struct pf_ruleset *,
- const struct pf_rule *, struct pfioc_rule *);
-@@ -2194,7 +2194,7 @@
- const struct tcphdr *);
- void pf_osfp_flush(void);
- int pf_osfp_get(struct pf_osfp_ioctl *);
--#ifdef __FreeBSD__
-+#if 1
- int pf_osfp_initialize(void);
- void pf_osfp_cleanup(void);
- #else
Deleted: trunk/freebsd-utils/debian/patches/pf_regex_followup.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/pf_regex_followup.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/pf_regex_followup.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,147 +0,0 @@
---- a/src/contrib/pf/authpf/authpf.c
-+++ b/src/contrib/pf/authpf/authpf.c
-@@ -19,6 +19,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/file.h>
- #include <sys/ioctl.h>
-@@ -155,7 +156,7 @@
- else
- shell = pw->pw_shell;
-
--#if 0
-+#ifndef __FreeBSD__
- login_close(lc);
- #endif
-
-@@ -163,7 +164,7 @@
- strcmp(shell, PATH_AUTHPF_SHELL_NOIP)) {
- syslog(LOG_ERR, "wrong shell for user %s, uid %u",
- pw->pw_name, pw->pw_uid);
--#if 1
-+#ifdef __FreeBSD__
- login_close(lc);
- #else
- if (shell != pw->pw_shell)
-@@ -172,7 +173,7 @@
- goto die;
- }
-
--#if 1
-+#ifdef __FreeBSD__
- login_close(lc);
- #else
- if (shell != pw->pw_shell)
---- a/src/contrib/pf/ftp-proxy/ftp-proxy.c
-+++ b/src/contrib/pf/ftp-proxy/ftp-proxy.c
-@@ -19,6 +19,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/queue.h>
- #include <sys/types.h>
- #include <sys/time.h>
---- a/src/contrib/pf/libevent/kqueue.c
-+++ b/src/contrib/pf/libevent/kqueue.c
-@@ -30,6 +30,7 @@
- #include "config.h"
- #endif
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #ifdef HAVE_SYS_TIME_H
- #include <sys/time.h>
---- a/src/contrib/pf/pfctl/parse.y
-+++ b/src/contrib/pf/pfctl/parse.y
-@@ -30,6 +30,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/stat.h>
---- a/src/contrib/pf/pfctl/pf_print_state.c
-+++ b/src/contrib/pf/pfctl/pf_print_state.c
-@@ -33,6 +33,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #if 1
---- a/src/contrib/pf/pfctl/pfctl.c
-+++ b/src/contrib/pf/pfctl/pfctl.c
-@@ -34,6 +34,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
---- a/src/contrib/pf/pfctl/pfctl_altq.c
-+++ b/src/contrib/pf/pfctl/pfctl_altq.c
-@@ -21,6 +21,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
---- a/src/contrib/pf/pfctl/pfctl_optimize.c
-+++ b/src/contrib/pf/pfctl/pfctl_optimize.c
-@@ -19,6 +19,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
---- a/src/contrib/pf/pfctl/pfctl_qstats.c
-+++ b/src/contrib/pf/pfctl/pfctl_qstats.c
-@@ -19,6 +19,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
---- a/src/contrib/pf/pflogd/pflogd.c
-+++ b/src/contrib/pf/pflogd/pflogd.c
-@@ -33,6 +33,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/file.h>
---- a/src/contrib/pf/pflogd/privsep.c
-+++ b/src/contrib/pf/pflogd/privsep.c
-@@ -20,6 +20,7 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD$");
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/socket.h>
---- a/src/contrib/pf/tftp-proxy/filter.c
-+++ b/src/contrib/pf/tftp-proxy/filter.c
-@@ -20,6 +20,7 @@
- #include <syslog.h>
-
- #include <sys/ioctl.h>
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/socket.h>
-
Deleted: trunk/freebsd-utils/debian/patches/powerd_no_cpufreq.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/powerd_no_cpufreq.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/powerd_no_cpufreq.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,22 +0,0 @@
-
-From SVN rev 234070.
-
---- a/src/usr.sbin/powerd/powerd.c
-+++ b/src/usr.sbin/powerd/powerd.c
-@@ -44,6 +44,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <sysexits.h>
- #include <unistd.h>
-
- #ifdef __i386__
-@@ -536,7 +537,7 @@
- err(1, "lookup kern.cp_times");
- len = 4;
- if (sysctlnametomib("dev.cpu.0.freq", freq_mib, &len))
-- err(1, "lookup freq");
-+ err(EX_UNAVAILABLE, "no cpufreq(4) support -- aborting");
- len = 4;
- if (sysctlnametomib("dev.cpu.0.freq_levels", levels_mib, &len))
- err(1, "lookup freq_levels");
Modified: trunk/freebsd-utils/debian/patches/ppp_macros.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/ppp_macros.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/ppp_macros.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -71,7 +71,7 @@
#include <sys/module.h>
#endif
#include <termios.h>
--#if !defined(__FreeBSD__) || __FreeBSD__ < 3
+-#ifndef __FreeBSD__
+#ifndef __FreeBSD_kernel__
#include <time.h>
#endif
@@ -82,29 +82,7 @@
#include "id.h"
#include "log.h"
#endif
-@@ -56,20 +56,11 @@
-
- #define issep(c) ((c) == '\t' || (c) == ' ')
-
--#if defined(__NetBSD__) || __FreeBSD__ < 3
-+#ifdef __NetBSD__
- void
- randinit()
- {
--#if defined(__FreeBSD__)
-- static int initdone; /* srandomdev() call is only required once */
--
-- if (!initdone) {
-- initdone = 1;
-- srandomdev();
-- }
--#else
- srandom((time(NULL)^getpid())+random());
--#endif
- }
- #endif
-
-@@ -420,7 +411,7 @@
+@@ -411,7 +411,7 @@
}
}
@@ -124,18 +102,9 @@
/* Check the following definitions for your machine environment */
-#ifdef __FreeBSD__
+#ifdef __FreeBSD_kernel__
- # define MODEM_LIST "/dev/cuad1\0/dev/cuad0" /* name of tty device */
+ # define MODEM_LIST "/dev/cuau1\0/dev/cuau0" /* name of tty device */
#else
# ifdef __OpenBSD__
-@@ -117,7 +119,7 @@
-
- #define ROUNDUP(x) ((x) ? (1 + (((x) - 1) | (sizeof(long) - 1))) : sizeof(long))
-
--#if defined(__NetBSD__) || __FreeBSD__ < 3
-+#ifdef __NetBSD__
- extern void randinit(void);
- #else
- #define random arc4random
--- a/src/usr.sbin/ppp/id.c
+++ b/src/usr.sbin/ppp/id.c
@@ -40,7 +40,7 @@
Modified: trunk/freebsd-utils/debian/patches/route_list.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/route_list.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/route_list.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -4,22 +4,23 @@
--- a/src/sbin/route/route.c
+++ b/src/sbin/route/route.c
-@@ -152,9 +152,16 @@
+@@ -139,9 +139,19 @@
+ usage(const char *cp)
{
if (cp != NULL)
++ {
warnx("bad keyword: %s", cp);
+ errx(EX_USAGE, "usage: route [-dnqtv] command [[modifiers] args]");
+ /* NOTREACHED */
++ } else {
++ warnx("warning: route invoked with no arguments. fallback to \"netstat -r\"\n");
+
- (void) fprintf(stderr,
-- "usage: route [-dnqtv] command [[modifiers] args]\n");
-- exit(EX_USAGE);
-+ "warning: route invoked with no arguments. fallback to \"netstat -r\"\n");
-+
-+ /* For compatibility with the Linux version of route. */
-+ char *opt = nflag ? "-n" : NULL;
-+ char *netstat_args[] = { "netstat", "-r", opt, NULL };
-+ execvp("netstat", netstat_args);
-+ err(1, "netstat");
-+
- /* NOTREACHED */
++ /* For compatibility with the Linux version of route. */
++ char *opt = nflag ? "-n" : NULL;
++ char *netstat_args[] = { "netstat", "-r", opt, NULL };
++ execvp("netstat", netstat_args);
++ err(1, "netstat");
++ }
}
+ int
Modified: trunk/freebsd-utils/debian/patches/savecore_signal.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/savecore_signal.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/savecore_signal.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,6 +1,6 @@
--- a/src/sbin/savecore/savecore.c
+++ b/src/sbin/savecore/savecore.c
-@@ -77,6 +77,7 @@
+@@ -78,6 +78,7 @@
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
Modified: trunk/freebsd-utils/debian/patches/series
===================================================================
--- trunk/freebsd-utils/debian/patches/series 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/series 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,27 +1,20 @@
# Patches from (or merged in) upstream
-ifconfig_nojail.diff
-powerd_no_cpufreq.diff
savecore_signal.diff
-mount_n.diff
# Patches that are in good shape for merging upstream
pf_regex_c.diff
-pf_regex_followup.diff
mount_cli_compat.diff
ppp_macros.diff
netstat_numeric_default.diff
route_list.diff
+001_dmesg.diff
# Other patches that might or might not be mergeable
-001_dmesg.diff
002_ifconfig.diff
-003_kbdcontrol.diff
004_kldconfig.diff
006_mdconfig.diff
007_mount.diff
-008_mount_hpfs.diff
009_mount_msdosfs.diff
-010_mount_ntfs.diff
011_mount_nullfs.diff
013_pf.diff
014_route.diff
@@ -35,7 +28,6 @@
026_kdump.diff
028_vidcontrol.diff
035_nfs.diff
-039_geom.diff
041_delete_key.diff
devd_link_c++_statically.diff
stablerestart-fhs-compliance.diff
@@ -43,4 +35,5 @@
# Patches that are likely to be Debian-specific
ifr_fib_kludge.diff
+ifi_vhid.diff
makefiles.diff
Modified: trunk/freebsd-utils/debian/patches/stablerestart-fhs-compliance.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/stablerestart-fhs-compliance.diff 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/patches/stablerestart-fhs-compliance.diff 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,19 +1,19 @@
--- a/src/usr.sbin/nfsd/nfsd.c
+++ b/src/usr.sbin/nfsd/nfsd.c
-@@ -80,8 +80,8 @@
- int debug = 0;
- #endif
+@@ -78,8 +78,8 @@
+ static int debug = 0;
+
-#define NFSD_STABLERESTART "/var/db/nfs-stablerestart"
-#define NFSD_STABLEBACKUP "/var/db/nfs-stablerestart.bak"
+#define NFSD_STABLERESTART "/var/lib/freebsd-nfs-server/nfs-stablerestart"
+#define NFSD_STABLEBACKUP "/var/lib/freebsd-nfs-server/nfs-stablerestart.bak"
#define MAXNFSDCNT 256
#define DEFNFSDCNT 4
- pid_t children[MAXNFSDCNT]; /* PIDs of children */
+ static pid_t children[MAXNFSDCNT]; /* PIDs of children */
--- a/src/usr.sbin/nfsd/nfsv4.4
+++ b/src/usr.sbin/nfsd/nfsv4.4
-@@ -311,10 +311,10 @@
+@@ -309,10 +309,10 @@
If all other nfsd threads are blocked waiting for lock(s) held by this nfsd
thread, then there isn't an nfsd thread to service the Close RPC.
.Sh FILES
Modified: trunk/freebsd-utils/debian/pf.manpages
===================================================================
--- trunk/freebsd-utils/debian/pf.manpages 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/pf.manpages 2014-01-20 22:44:17 UTC (rev 5364)
@@ -1,3 +1,3 @@
src/contrib/pf/authpf/authpf.8
-src/contrib/pf/pfctl/pfctl.8
+src/sbin/pfctl/pfctl.8
src/contrib/pf/man/*.5
Modified: trunk/freebsd-utils/debian/rules
===================================================================
--- trunk/freebsd-utils/debian/rules 2014-01-20 21:23:25 UTC (rev 5363)
+++ trunk/freebsd-utils/debian/rules 2014-01-20 22:44:17 UTC (rev 5364)
@@ -122,12 +122,13 @@
sbin/ifconfig etc/regdomain.xml \
sbin/route usr.bin/netstat usr.sbin/rpc.umntall \
usr.sbin/ppp usr.sbin/pppctl usr.sbin/arp usr.bin/mkuzip \
- sbin/ipfw contrib/pf sbin/pfctl usr.sbin/authpf sys/contrib/pf/net \
- sbin/mount_std sbin/umount sbin/mount_cd9660 \
- sbin/mount_ext2fs sbin/mount_hpfs sbin/mount_msdosfs \
- sbin/mount_ntfs sbin/mount_nullfs sbin/mount_udf sbin/mount_unionfs \
- sbin/mount_reiserfs sbin/mount \
- sbin/mdconfig sbin/ccdconfig sbin/swapon sbin/atacontrol sbin/camcontrol \
+ sbin/ipfw contrib/pf sbin/pfctl usr.sbin/authpf sys/netpfil/pf \
+ sbin/umount sbin/mount_cd9660 \
+ sbin/mount_msdosfs \
+ sbin/mount_fusefs \
+ sbin/mount_nullfs sbin/mount_udf sbin/mount_unionfs \
+ sbin/mount \
+ sbin/mdconfig sbin/ccdconfig sbin/swapon sbin/camcontrol \
sbin/gbde bin/kenv \
sbin/geom sys/geom/eli sys/crypto/sha2 \
usr.sbin/kbdcontrol usr.sbin/vidcontrol share/syscons \
More information about the Glibc-bsd-commits
mailing list