diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index adae174e404..7b76ff0ca7d 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -184,7 +184,7 @@ div_input(struct mbuf **mp, int *offp, int proto) * then pass them along with mbuf chain. */ static void -divert_packet(struct mbuf *m, int incoming) +divert_packet(struct mbuf *m, bool incoming) { struct ip *ip; struct inpcb *inp; diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index d55a18bba91..ee8b864c56d 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -292,7 +292,7 @@ VNET_DECLARE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr); #define V_ip_fw_ctl_ptr VNET(ip_fw_ctl_ptr) /* Divert hooks. */ -extern void (*ip_divert_ptr)(struct mbuf *m, int incoming); +extern void (*ip_divert_ptr)(struct mbuf *m, bool incoming); /* ng_ipfw hooks -- XXX make it the same as divert and dummynet */ extern int (*ng_ipfw_input_p)(struct mbuf **, int, struct ip_fw_args *, int); diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index aa972614e52..4ca3b3ecc3c 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -101,7 +101,7 @@ VNET_DEFINE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr) = NULL; int (*ip_dn_ctl_ptr)(struct sockopt *); int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); -void (*ip_divert_ptr)(struct mbuf *, int); +void (*ip_divert_ptr)(struct mbuf *, bool); int (*ng_ipfw_input_p)(struct mbuf **, int, struct ip_fw_args *, int); diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index 440d73e3f1f..0a586a8986a 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -85,7 +85,7 @@ VNET_DEFINE_STATIC(int, fwlink_enable) = 0; int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); /* Forward declarations. */ -static int ipfw_divert(struct mbuf **, int, struct ipfw_rule_ref *, int); +static int ipfw_divert(struct mbuf **, bool, struct ipfw_rule_ref *, int); #ifdef SYSCTL_NODE @@ -282,7 +282,7 @@ again: break; } MPASS(args.flags & IPFW_ARGS_REF); - (void )ipfw_divert(m0, dir, &args.rule, + (void )ipfw_divert(m0, dir == DIR_IN, &args.rule, (ipfw == IP_FW_TEE) ? 1 : 0); /* continue processing for the original packet (tee). */ if (*m0) @@ -443,7 +443,7 @@ again: /* do the divert, return 1 on error 0 on success */ static int -ipfw_divert(struct mbuf **m0, int incoming, struct ipfw_rule_ref *rule, +ipfw_divert(struct mbuf **m0, bool incoming, struct ipfw_rule_ref *rule, int tee) { /* diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 85ed3376b1a..9dc2acec523 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -91,8 +91,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* XXX: only for DIR_IN/DIR_OUT */ - #ifdef INET6 #include #include @@ -6184,7 +6182,7 @@ done: m->m_flags &= ~M_FASTFWD_OURS; } } - ip_divert_ptr(*m0, dir == PF_IN ? DIR_IN : DIR_OUT); + ip_divert_ptr(*m0, dir == PF_IN); *m0 = NULL; return (action);