From 71ad35a185f06a835bdcb6c29c4badc68c4f9b28 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo <luigi@FreeBSD.org> Date: Thu, 15 Jul 2010 14:43:12 +0000 Subject: [PATCH] remove some conditional #ifdefs (no-op on FreeBSD); run the timer routine on cpu 0. --- sys/netinet/ipfw/ip_fw_dynamic.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/netinet/ipfw/ip_fw_dynamic.c b/sys/netinet/ipfw/ip_fw_dynamic.c index 69475828e1e7..c8ea4b756cf5 100644 --- a/sys/netinet/ipfw/ip_fw_dynamic.c +++ b/sys/netinet/ipfw/ip_fw_dynamic.c @@ -894,10 +894,7 @@ struct mbuf * ipfw_send_pkt(struct mbuf *replyto, struct ipfw_flow_id *id, u_int32_t seq, u_int32_t ack, int flags) { -#ifndef __FreeBSD__ - return NULL; -#else - struct mbuf *m; + struct mbuf *m = NULL; /* stupid compiler */ int len, dir; struct ip *h = NULL; /* stupid compiler */ #ifdef INET6 @@ -1033,7 +1030,6 @@ ipfw_send_pkt(struct mbuf *replyto, struct ipfw_flow_id *id, u_int32_t seq, } return (m); -#endif /* __FreeBSD__ */ } /* @@ -1131,8 +1127,8 @@ ipfw_tick(void * vnetx) } #endif done: - callout_reset(&V_ipfw_timeout, V_dyn_keepalive_period * hz, - ipfw_tick, vnetx); + callout_reset_on(&V_ipfw_timeout, V_dyn_keepalive_period * hz, + ipfw_tick, vnetx, 0); CURVNET_RESTORE(); } @@ -1173,7 +1169,7 @@ ipfw_dyn_init(void) V_dyn_max = 4096; /* max # of dynamic rules */ callout_init(&V_ipfw_timeout, CALLOUT_MPSAFE); - callout_reset(&V_ipfw_timeout, hz, ipfw_tick, curvnet); + callout_reset_on(&V_ipfw_timeout, hz, ipfw_tick, curvnet, 0); } void