-/* $OpenBSD: if_bridge.h,v 1.40 2014/12/22 03:38:01 tedu Exp $ */
+/* $OpenBSD: if_bridge.h,v 1.41 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
u_int8_t brt_flags; /* address flags */
u_int8_t brt_age; /* age counter */
struct ether_addr brt_addr; /* dst addr */
- union sockaddr_union brt_tunnel; /* tunnel endpoint */
+ union pfsockaddr_union brt_tunnel; /* tunnel endpoint */
};
#ifndef BRIDGE_RTABLE_SIZE
-/* $OpenBSD: if_pfsync.c,v 1.215 2014/12/19 17:14:39 tedu Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.216 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
#include <netinet/if_ether.h>
#include <netinet/tcp.h>
#include <netinet/tcp_seq.h>
+#include <netinet/tcp_fsm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
+#ifdef IPSEC
+#include <netinet/ip_ipsp.h>
+#endif /* IPSEC */
+
#ifdef INET6
#include <netinet6/in6_var.h>
#include <netinet/ip6.h>
#define PF_DEBUGNAME "pfsync: "
#include <net/pfvar.h>
+#include <netinet/ip_ipsp.h>
#include <net/if_pfsync.h>
#include "bpfilter.h"
goto bad;
s = splsoftnet();
- tdb = gettdb(ntohs(pt->rdomain), pt->spi, &pt->dst, pt->sproto);
+ tdb = gettdb(ntohs(pt->rdomain), pt->spi,
+ (union sockaddr_union *)&pt->dst, pt->sproto);
if (tdb) {
pt->rpl = betoh64(pt->rpl);
pt->cur_bytes = betoh64(pt->cur_bytes);
-/* $OpenBSD: if_pfsync.h,v 1.47 2013/10/24 11:14:33 deraadt Exp $ */
+/* $OpenBSD: if_pfsync.h,v 1.48 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
struct pfsync_tdb {
u_int32_t spi;
- union sockaddr_union dst;
+ union pfsockaddr_union dst;
u_int64_t rpl;
u_int64_t cur_bytes;
u_int8_t sproto;
-/* $OpenBSD: if_vxlan.c,v 1.20 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.21 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
#include <net/bpf.h>
#endif
-#if NPF > 0
-#include <net/pfvar.h>
-#endif
-
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet/if_ether.h>
#include <netinet/udp_var.h>
#include <netinet/in_pcb.h>
+#if NPF > 0
+#include <net/pfvar.h>
+#endif
+
#if NBRIDGE > 0
#include <net/if_bridge.h>
#endif
-/* $OpenBSD: pf.c,v 1.898 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: pf.c,v 1.899 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
#include <netinet/in_pcb.h>
#include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
#include <netinet/udp_var.h>
#include <netinet/icmp_var.h>
#include <netinet/if_ether.h>
-/* $OpenBSD: pf_ioctl.c,v 1.280 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.281 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
#include <crypto/md5.h>
#include <net/pfvar.h>
-#if NPFSYNC > 0
-#include <net/if_pfsync.h>
-#endif /* NPFSYNC > 0 */
-
#if NPFLOG > 0
#include <net/if_pflog.h>
#endif /* NPFLOG > 0 */
+#if NPFSYNC > 0
+#include <netinet/ip_ipsp.h>
+#include <net/if_pfsync.h>
+#endif /* NPFSYNC > 0 */
+
#ifdef INET6
#include <netinet/ip6.h>
#include <netinet/in_pcb.h>
-/* $OpenBSD: pf_norm.c,v 1.172 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: pf_norm.c,v 1.173 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
#include <sys/pool.h>
#include <sys/syslog.h>
-#include <net/if.h>
-#include <net/if_var.h>
-#include <net/if_types.h>
-#include <net/bpf.h>
-#include <net/if_pflog.h>
-
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/tcp.h>
#include <netinet/tcp_seq.h>
+#include <netinet/tcp_fsm.h>
#include <netinet/udp.h>
#include <netinet/ip_icmp.h>
+#include <net/if.h>
+#include <net/if_var.h>
+#include <net/if_types.h>
+#include <net/bpf.h>
+#include <net/if_pflog.h>
+
#ifdef INET6
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
-/* $OpenBSD: pfkeyv2_convert.c,v 1.45 2014/12/28 10:02:37 tedu Exp $ */
+/* $OpenBSD: pfkeyv2_convert.c,v 1.46 2015/01/24 00:29:06 deraadt Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@keromytis.org)
*
#include <net/route.h>
#include <net/if.h>
-#if NPF > 0
-#include <net/pfvar.h>
-#endif
-
+#include <netinet/in.h>
#include <netinet/ip_ipsp.h>
#include <net/pfkeyv2.h>
#include <crypto/cryptodev.h>
#include <crypto/xform.h>
+#if NPF > 0
+#include <net/pfvar.h>
+#endif
+
/*
* (Partly) Initialize a TDB based on an SADB_SA payload. Other parts
* of the TDB will be initialized by other import routines, and tdb_init().
-/* $OpenBSD: pfvar.h,v 1.407 2015/01/15 23:56:58 deraadt Exp $ */
+/* $OpenBSD: pfvar.h,v 1.408 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
#include <net/radix.h>
#include <net/route.h>
-#include <netinet/ip_ipsp.h>
-#include <netinet/tcp_fsm.h>
struct ip;
struct ip6_hdr;
u_int64_t states;
};
+/*
+ * XXX ip_ipsp.h's sockaddr_union should be converted to sockaddr *
+ * passing with correct sa_len, then a good approach for cleaning this
+ * will become more clear.
+ */
+union pfsockaddr_union {
+ struct sockaddr sa;
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+};
+
SLIST_HEAD(pfr_kentryworkq, pfr_kentry);
struct _pfr_kentry {
struct radix_node _pfrke_node[2];
- union sockaddr_union _pfrke_sa;
+ union pfsockaddr_union _pfrke_sa;
SLIST_ENTRY(pfr_kentry) _pfrke_workq;
struct pfr_kcounters *_pfrke_counters;
time_t _pfrke_tzero;
-/* $OpenBSD: in_pcb.c,v 1.165 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.166 2015/01/24 00:29:06 deraadt Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
-#include <net/pfvar.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/in_var.h>
#include <netinet/ip_var.h>
+#include <net/pfvar.h>
+
#include <sys/mount.h>
#include <nfs/nfsproto.h>
-/* $OpenBSD: ip_divert.c,v 1.31 2014/12/05 15:50:04 mpi Exp $ */
+/* $OpenBSD: ip_divert.c,v 1.32 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
#include <sys/sysctl.h>
#include <net/if.h>
+#include <net/route.h>
#include <net/if_var.h>
#include <net/netisr.h>
-#include <net/pfvar.h>
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet/udp.h>
#include <netinet/ip_icmp.h>
+#include <net/pfvar.h>
+
struct inpcbtable divbtable;
struct divstat divstat;
-/* $OpenBSD: ip_ipsp.c,v 1.202 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.203 2015/01/24 00:29:06 deraadt Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
#include <sys/timeout.h>
#include <net/if.h>
+#include <net/route.h>
+
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/in_pcb.h>
+#include <netinet/ip_var.h>
#if NPF > 0
#include <net/pfvar.h>
#include <net/if_pfsync.h>
#endif
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
-#include <netinet/ip_var.h>
-
-#ifdef INET6
-#endif /* INET6 */
-
#include <netinet/ip_ipsp.h>
#include <net/pfkeyv2.h>
#include <crypto/xform.h>
-/* $OpenBSD: ipsec_input.c,v 1.125 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.126 2015/01/24 00:29:06 deraadt Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
#include <net/bpf.h>
#include <net/route.h>
-#if NPF > 0
-#include <net/pfvar.h>
-#endif
-
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
+#if NPF > 0
+#include <net/pfvar.h>
+#endif
+
#ifdef INET6
#include <netinet6/in6_var.h>
#include <netinet/ip6.h>
-/* $OpenBSD: ipsec_output.c,v 1.55 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: ipsec_output.c,v 1.56 2015/01/24 00:29:06 deraadt Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
#include <sys/timeout.h>
#include <net/if.h>
-
-#if NPF > 0
-#include <net/pfvar.h>
-#endif
+#include <net/route.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/in_pcb.h>
#include <netinet/ip_var.h>
-#ifdef INET6
-#endif /* INET6 */
+#if NPF > 0
+#include <net/pfvar.h>
+#endif
#include <netinet/udp.h>
#include <netinet/ip_ipsp.h>
-/* $OpenBSD: raw_ip.c,v 1.78 2014/12/05 15:50:04 mpi Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.79 2015/01/24 00:29:06 deraadt Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
-#include <net/pfvar.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/in_var.h>
#include <netinet/ip_icmp.h>
+#include <net/pfvar.h>
+
#include "pf.h"
struct inpcbtable rawcbtable;
-/* $OpenBSD: in6.c,v 1.149 2015/01/10 11:43:37 mpi Exp $ */
+/* $OpenBSD: in6.c,v 1.150 2015/01/24 00:29:06 deraadt Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/sockio.h>
+#include <sys/mbuf.h>
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/kernel.h>
-/* $OpenBSD: in6_gif.c,v 1.35 2014/12/19 17:14:40 tedu Exp $ */
+/* $OpenBSD: in6_gif.c,v 1.36 2015/01/24 00:29:06 deraadt Exp $ */
/* $KAME: in6_gif.c,v 1.43 2001/01/22 07:27:17 itojun Exp $ */
/*
#include <net/if.h>
#include <net/if_var.h>
+#include <netinet/in.h>
+#include <netinet/ip_ipsp.h>
+
#if NPF > 0
#include <net/pfvar.h>
#endif
-#include <netinet/in.h>
-#include <netinet/ip_ipsp.h>
-
#include <netinet/ip.h>
#include <netinet/ip6.h>
-/* $OpenBSD: ip6_divert.c,v 1.31 2014/12/05 15:50:04 mpi Exp $ */
+/* $OpenBSD: ip6_divert.c,v 1.32 2015/01/24 00:29:06 deraadt Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
#include <sys/sysctl.h>
#include <net/if.h>
+#include <net/route.h>
#include <net/if_var.h>
#include <net/netisr.h>
-#include <net/pfvar.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <netinet/icmp6.h>
+#include <net/pfvar.h>
+
struct inpcbtable divb6table;
struct div6stat div6stat;
-/* $OpenBSD: raw_ip6.c,v 1.71 2014/12/05 15:50:04 mpi Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.72 2015/01/24 00:29:06 deraadt Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
#include <net/if_var.h>
#include <net/route.h>
#include <net/if_types.h>
-#if NPF > 0
-#include <net/pfvar.h>
-#endif
#include <netinet/in.h>
#include <netinet6/in6_var.h>
#include <netinet6/ip6protosw.h>
#include <netinet6/raw_ip6.h>
+#if NPF > 0
+#include <net/pfvar.h>
+#endif
+
#include <sys/stdarg.h>
/*