[ipfilter-cvs] ipfilter fil.c, v5-1-RELEASE ip_auth.c, v5-1-RELEASE ip_compat.h, v5-1-RELEASE ip_ds
Brought to you by:
darren_r
Update of /cvsroot/ipfilter/ipfilter In directory vz-cvs-4.sog:/tmp/cvs-serv1804 Modified Files: Tag: v5-1-RELEASE fil.c ip_auth.c ip_compat.h ip_dstlist.c ip_fil.h ip_fil_solaris.c ip_frag.c ip_ftp_pxy.c ip_htable.c ip_ipsec_pxy.c ip_irc_pxy.c ip_log.c ip_lookup.c ip_lookup.h ip_nat.c ip_nat6.c ip_netbios_pxy.c ip_pool.c ip_pptp_pxy.c ip_proxy.c ip_proxy.h ip_raudio_pxy.c ip_rcmd_pxy.c ip_rpcb_pxy.c ip_state.c ip_sync.c ip_sync.h ip_tftp_pxy.c ipf_rb.h radix_ipf.c radix_ipf.h solaris.c Log Message: 3556683 lint cleanup Index: ip_auth.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_auth.c,v retrieving revision 1.21.2.10 retrieving revision 1.21.2.11 diff -C2 -d -r1.21.2.10 -r1.21.2.11 *** ip_auth.c 15 Jun 2012 08:33:37 -0000 1.21.2.10 --- ip_auth.c 13 Aug 2012 11:44:14 -0000 1.21.2.11 *************** *** 203,206 **** --- 203,207 ---- /* and initialise some fields to their defaults. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ void * ipf_auth_soft_create(softc) *************** *** 236,239 **** --- 237,241 ---- /* rules. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ int ipf_auth_soft_init(softc, arg) *************** *** 275,278 **** --- 277,281 ---- /* is free'd by _destroy(). */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ int ipf_auth_soft_fini(softc, arg) *************** *** 335,338 **** --- 338,342 ---- /* Undo what was done in _create() - i.e. free the soft context data. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ void ipf_auth_soft_destroy(softc, arg) *************** *** 625,629 **** else { WRITE_ENTER(&softc->ipf_tokens); ! ipf_token_deref(softc, token); RWLOCK_EXIT(&softc->ipf_tokens); IPFERROR(10001); --- 629,633 ---- else { WRITE_ENTER(&softc->ipf_tokens); ! (void) ipf_token_deref(softc, token); RWLOCK_EXIT(&softc->ipf_tokens); IPFERROR(10001); Index: ip_tftp_pxy.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_tftp_pxy.c,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -C2 -d -r1.1.2.9 -r1.1.2.10 *** ip_tftp_pxy.c 22 Jul 2012 08:04:23 -0000 1.1.2.9 --- ip_tftp_pxy.c 13 Aug 2012 11:44:15 -0000 1.1.2.10 *************** *** 14,18 **** } ipf_tftp_softc_t; ! int ipf_p_tftp_backchannel __P((fr_info_t *, ap_session_t *, nat_t *)); int ipf_p_tftp_client __P((ipf_tftp_softc_t *, fr_info_t *, ap_session_t *, nat_t *)); --- 14,18 ---- } ipf_tftp_softc_t; ! void ipf_p_tftp_backchannel __P((fr_info_t *, ap_session_t *, nat_t *)); int ipf_p_tftp_client __P((ipf_tftp_softc_t *, fr_info_t *, ap_session_t *, nat_t *)); *************** *** 23,28 **** void ipf_p_tftp_del __P((ipf_main_softc_t *, ap_session_t *)); int ipf_p_tftp_out __P((void *, fr_info_t *, ap_session_t *, nat_t *)); ! int ipf_p_tftp_server __P((ipf_tftp_softc_t *, fr_info_t *, ap_session_t *, ! nat_t *)); void *ipf_p_tftp_soft_create __P((ipf_main_softc_t *)); void ipf_p_tftp_soft_destroy __P((ipf_main_softc_t *, void *)); --- 23,27 ---- void ipf_p_tftp_del __P((ipf_main_softc_t *, ap_session_t *)); int ipf_p_tftp_out __P((void *, fr_info_t *, ap_session_t *, nat_t *)); ! int ipf_p_tftp_server __P((fr_info_t *, ap_session_t *)); void *ipf_p_tftp_soft_create __P((ipf_main_softc_t *)); void ipf_p_tftp_soft_destroy __P((ipf_main_softc_t *, void *)); *************** *** 121,125 **** if (softt->ipf_p_tftp_tune != NULL) { ! ipf_tune_array_unlink(softc, softt->ipf_p_tftp_tune); KFREES(softt->ipf_p_tftp_tune, sizeof(ipf_tftp_tuneables)); softt->ipf_p_tftp_tune = NULL; --- 120,124 ---- if (softt->ipf_p_tftp_tune != NULL) { ! (void) ipf_tune_array_unlink(softc, softt->ipf_p_tftp_tune); KFREES(softt->ipf_p_tftp_tune, sizeof(ipf_tftp_tuneables)); softt->ipf_p_tftp_tune = NULL; *************** *** 142,146 **** if (nat->nat_dir == NAT_OUTBOUND) return ipf_p_tftp_client(softt, fin, aps, nat); ! return ipf_p_tftp_server(softt, fin, aps, nat); } --- 141,145 ---- if (nat->nat_dir == NAT_OUTBOUND) return ipf_p_tftp_client(softt, fin, aps, nat); ! return ipf_p_tftp_server(fin, aps); } *************** *** 158,165 **** if (nat->nat_dir == NAT_INBOUND) return ipf_p_tftp_client(softt, fin, aps, nat); ! return ipf_p_tftp_server(softt, fin, aps, nat); } int ipf_p_tftp_new(arg, fin, aps, nat) --- 157,165 ---- if (nat->nat_dir == NAT_INBOUND) return ipf_p_tftp_client(softt, fin, aps, nat); ! return ipf_p_tftp_server(fin, aps); } + /*ARGSUSED*/ int ipf_p_tftp_new(arg, fin, aps, nat) *************** *** 280,284 **** * Setup for a new TFTP proxy. */ ! int ipf_p_tftp_backchannel(fin, aps, nat) fr_info_t *fin; --- 280,284 ---- * Setup for a new TFTP proxy. */ ! void ipf_p_tftp_backchannel(fin, aps, nat) fr_info_t *fin; *************** *** 304,307 **** --- 304,309 ---- int dir; + slen = 0; + nat2 = NULL; ti = aps->aps_data; /* *************** *** 366,371 **** --- 368,375 ---- if (nat->nat_v[0] == 4) nat2 = ipf_nat_add(&fi, ti->ti_rule, NULL, nflags, dir); + #ifdef USE_INET6 else nat2 = ipf_nat6_add(&fi, ti->ti_rule, NULL, nflags, dir); + #endif MUTEX_EXIT(&softn->ipf_nat_new); if (nat2 != NULL) { *************** *** 413,417 **** #endif } - return 0; } --- 417,420 ---- *************** *** 427,431 **** tftpinfo_t *ti; u_short opcode; - udphdr_t *udp; int len; --- 430,433 ---- *************** *** 446,450 **** /* FALLTHROUGH */ case TFTP_CMD_READ : ! len = fin->fin_dlen - sizeof(*udp) - 2; if (len > sizeof(ti->ti_filename) - 1) len = sizeof(ti->ti_filename) - 1; --- 448,452 ---- /* FALLTHROUGH */ case TFTP_CMD_READ : ! len = fin->fin_dlen - sizeof(udphdr_t) - 2; if (len > sizeof(ti->ti_filename) - 1) len = sizeof(ti->ti_filename) - 1; *************** *** 467,476 **** int ! ipf_p_tftp_server(softt, fin, aps, nat) ! ipf_tftp_softc_t *softt; fr_info_t *fin; ap_session_t *aps; - nat_t *nat; { tftpinfo_t *ti; --- 469,477 ---- + /*ARGSUSED*/ int ! ipf_p_tftp_server(fin, aps) fr_info_t *fin; ap_session_t *aps; { tftpinfo_t *ti; Index: ip_pool.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_pool.c,v retrieving revision 1.21.2.20 retrieving revision 1.21.2.21 diff -C2 -d -r1.21.2.20 -r1.21.2.21 *** ip_pool.c 22 Jul 2012 08:03:39 -0000 1.21.2.20 --- ip_pool.c 13 Aug 2012 11:44:15 -0000 1.21.2.21 *************** *** 296,299 **** --- 296,300 ---- /* Initialise the routing table data structures where required. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static int ipf_pool_soft_init(softc, arg) *************** *** 349,352 **** --- 350,354 ---- /* up the pool context too. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static void ipf_pool_soft_destroy(softc, arg) *************** *** 373,376 **** --- 375,379 ---- /* the address prior to calling for the pair to be added. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static int ipf_pool_node_add(softc, arg, op, uid) *************** *** 739,743 **** /* Searches for an exact match of an entry in the pool. */ /* ------------------------------------------------------------------------ */ ! extern void printhostmask __P((int, u_32_t *, u_32_t *)); static ip_pool_node_t * ipf_pool_findeq(softp, ipo, addr, mask) --- 742,746 ---- /* Searches for an exact match of an entry in the pool. */ /* ------------------------------------------------------------------------ */ ! /*ARGSUSED*/ static ip_pool_node_t * ipf_pool_findeq(softp, ipo, addr, mask) *************** *** 1213,1217 **** for (next = &ipo->ipo_list; (n = *next) != NULL; ) ! ipf_pool_remove_node(softc, softp, ipo, n); ipo->ipo_list = NULL; --- 1216,1220 ---- for (next = &ipo->ipo_list; (n = *next) != NULL; ) ! (void) ipf_pool_remove_node(softc, softp, ipo, n); ipo->ipo_list = NULL; *************** *** 1243,1247 **** else if ((ipo->ipo_ref == 1) && (ipo->ipo_flags & IPOOL_DELETE)) ! ipf_pool_destroy(softc, arg, ipo->ipo_unit, ipo->ipo_name); return 0; --- 1246,1251 ---- else if ((ipo->ipo_ref == 1) && (ipo->ipo_flags & IPOOL_DELETE)) ! (void) ipf_pool_destroy(softc, arg, ipo->ipo_unit, ! ipo->ipo_name); return 0; *************** *** 1373,1377 **** if (ipo != NULL) { WRITE_ENTER(&softc->ipf_poolrw); ! ipf_pool_deref(softc, softp, ipo); RWLOCK_EXIT(&softc->ipf_poolrw); } --- 1377,1381 ---- if (ipo != NULL) { WRITE_ENTER(&softc->ipf_poolrw); ! (void) ipf_pool_deref(softc, softp, ipo); RWLOCK_EXIT(&softc->ipf_poolrw); } *************** *** 1426,1430 **** { case IPFLOOKUPITER_LIST : ! ipf_pool_deref(softc, softp, (ip_pool_t *)data); break; --- 1430,1434 ---- { case IPFLOOKUPITER_LIST : ! (void) ipf_pool_deref(softc, softp, (ip_pool_t *)data); break; *************** *** 1464,1468 **** if (n->ipn_die > softc->ipf_ticks) break; ! ipf_pool_remove_node(softc, softp, n->ipn_owner, n); } } --- 1468,1472 ---- if (n->ipn_die > softc->ipf_ticks) break; ! (void) ipf_pool_remove_node(softc, softp, n->ipn_owner, n); } } Index: solaris.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/solaris.c,v retrieving revision 1.22.2.16 retrieving revision 1.22.2.17 diff -C2 -d -r1.22.2.16 -r1.22.2.17 *** solaris.c 29 May 2012 10:52:08 -0000 1.22.2.16 --- solaris.c 13 Aug 2012 11:44:15 -0000 1.22.2.17 *************** *** 234,239 **** #endif if (rval == 0) { ! ipf_unload_all(); ! ipf_stack_fini(); } return rval; --- 234,242 ---- #endif if (rval == 0) { ! rval = ipf_unload_all(); ! if (rval == 0) ! ipf_stack_fini(); ! else ! (void) mod_install(&modlink1); } return rval; *************** *** 440,444 **** rval = ipf_stack_init(); if (rval != 0) { ! ipf_unload_all(); return rval; } --- 443,447 ---- rval = ipf_stack_init(); if (rval != 0) { ! rval = ipf_unload_all(); return rval; } *************** *** 564,568 **** int revents = 0; ! if (xmin < 0 || xmin > IPL_LOGMAX) return ENXIO; --- 567,571 ---- int revents = 0; ! if (xmin > IPL_LOGMAX) return ENXIO; *************** *** 805,808 **** --- 808,812 ---- + /*ARGSUSED*/ int ipf_hk_v4_in(tok, data, arg) *************** *** 839,842 **** --- 843,847 ---- + /*ARGSUSED*/ int ipf_hk_v4_out(tok, data, arg) *************** *** 873,876 **** --- 878,882 ---- + /*ARGSUSED*/ int ipf_hk_v4_nic(tok, data, arg) *************** *** 908,911 **** --- 914,918 ---- + /*ARGSUSED*/ int ipf_hk_v6_in(tok, data, arg) *************** *** 941,944 **** --- 948,952 ---- + /*ARGSUSED*/ int ipf_hk_v6_out(tok, data, arg) *************** *** 974,977 **** --- 982,986 ---- + /*ARGSUSED*/ int ipf_hk_v6_nic(tok, data, arg) *************** *** 981,985 **** { hook_nic_event_t *nic = (hook_nic_event_t *)data; - ipf_main_softc_t *softc = (ipf_main_softc_t *)arg; switch (nic->hne_event) --- 990,993 ---- *************** *** 1029,1032 **** --- 1037,1041 ---- + /*ARGSUSED*/ static void ipf_instance_shutdown(netid_t id, void *arg) *************** *** 1038,1041 **** --- 1047,1051 ---- + /*ARGSUSED*/ static void ipf_instance_destroy(netid_t id, void *arg) *************** *** 1071,1075 **** ipf_stack_fini() { ! net_instance_unregister(ipf_inst); net_instance_free(ipf_inst); ipf_inst = NULL; --- 1081,1085 ---- ipf_stack_fini() { ! (void) net_instance_unregister(ipf_inst); net_instance_free(ipf_inst); ipf_inst = NULL; *************** *** 1143,1147 **** hook_free(softc->ipf_hk_v4_nic); ! net_protocol_release(softc->ipf_nd_v4); softc->ipf_nd_v4 = NULL; } --- 1153,1157 ---- hook_free(softc->ipf_hk_v4_nic); ! (void) net_protocol_release(softc->ipf_nd_v4); softc->ipf_nd_v4 = NULL; } *************** *** 1163,1167 **** hook_free(softc->ipf_hk_v6_nic); ! net_protocol_release(softc->ipf_nd_v6); softc->ipf_nd_v6 = NULL; } --- 1173,1177 ---- hook_free(softc->ipf_hk_v6_nic); ! (void) net_protocol_release(softc->ipf_nd_v6); softc->ipf_nd_v6 = NULL; } Index: ip_ipsec_pxy.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_ipsec_pxy.c,v retrieving revision 1.14.2.8 retrieving revision 1.14.2.9 diff -C2 -d -r1.14.2.8 -r1.14.2.9 *** ip_ipsec_pxy.c 22 Jul 2012 08:04:23 -0000 1.14.2.8 --- ip_ipsec_pxy.c 13 Aug 2012 11:44:15 -0000 1.14.2.9 *************** *** 41,44 **** --- 41,45 ---- * IPSec application proxy initialization. */ + /*ARGSUSED*/ void * ipf_p_ipsec_soft_create(softc) *************** *** 88,91 **** --- 89,93 ---- + /*ARGSUSED*/ void ipf_p_ipsec_soft_fini(softc, arg) *************** *** 111,114 **** --- 113,117 ---- + /*ARGSUSED*/ void ipf_p_ipsec_soft_destroy(softc, arg) Index: ip_dstlist.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_dstlist.c,v retrieving revision 1.13.2.12 retrieving revision 1.13.2.13 diff -C2 -d -r1.13.2.12 -r1.13.2.13 *** ip_dstlist.c 20 Jul 2012 08:40:19 -0000 1.13.2.12 --- ip_dstlist.c 13 Aug 2012 11:44:14 -0000 1.13.2.13 *************** *** 180,183 **** --- 180,184 ---- /* soft context is free it! */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static void ipf_dstlist_soft_destroy(softc, arg) *************** *** 199,202 **** --- 200,204 ---- /* There is currently no soft context for destination list management. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static int ipf_dstlist_soft_init(softc, arg) *************** *** 216,219 **** --- 218,222 ---- /* There is currently no soft context for destination list management. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static void ipf_dstlist_soft_fini(softc, arg) *************** *** 335,343 **** { case IPFLOOKUPITER_LIST : ! ipf_dstlist_table_deref(softc, arg, (ippool_dst_t *)data); break; case IPFLOOKUPITER_NODE : ! ipf_dstlist_node_deref(arg, (ipf_dstnode_t *)data); break; } --- 338,346 ---- { case IPFLOOKUPITER_LIST : ! (void) ipf_dstlist_table_deref(softc, arg,(ippool_dst_t *)data); break; case IPFLOOKUPITER_NODE : ! (void) ipf_dstlist_node_deref(arg, (ipf_dstnode_t *)data); break; } *************** *** 440,444 **** case IPFLOOKUPITER_LIST : if (dsttab != NULL) ! ipf_dstlist_table_deref(softc, arg, dsttab); err = COPYOUT(next, iter->ili_data, sizeof(*next)); if (err != 0) { --- 443,447 ---- case IPFLOOKUPITER_LIST : if (dsttab != NULL) ! (void) ipf_dstlist_table_deref(softc, arg, dsttab); err = COPYOUT(next, iter->ili_data, sizeof(*next)); if (err != 0) { *************** *** 450,454 **** case IPFLOOKUPITER_NODE : if (node != NULL) ! ipf_dstlist_node_deref(arg, node); err = COPYOUT(nextnode, iter->ili_data, sizeof(*nextnode)); if (err != 0) { --- 453,457 ---- case IPFLOOKUPITER_NODE : if (node != NULL) ! (void) ipf_dstlist_node_deref(arg, node); err = COPYOUT(nextnode, iter->ili_data, sizeof(*nextnode)); if (err != 0) { *************** *** 608,612 **** /* ------------------------------------------------------------------------ */ /* Function: ipf_dstlist_node_deref */ ! /* Returns: int - 0 = success, else error */ /* Parameters: arg(I) - pointer to local context to use */ /* node(I) - pointer to destionation node to free */ --- 611,615 ---- /* ------------------------------------------------------------------------ */ /* Function: ipf_dstlist_node_deref */ ! /* Returns: int - 0 = success, else current reference count */ /* Parameters: arg(I) - pointer to local context to use */ /* node(I) - pointer to destionation node to free */ *************** *** 630,634 **** if (ref > 0) ! return 0; if ((node->ipfd_flags & IPDST_DELETE) != 0) --- 633,637 ---- if (ref > 0) ! return ref; if ((node->ipfd_flags & IPDST_DELETE) != 0) *************** *** 761,765 **** } ! ipf_dstlist_node_deref(softd, node); } --- 764,768 ---- } ! (void) ipf_dstlist_node_deref(softd, node); } *************** *** 864,868 **** MUTEX_INIT(&new->ipld_lock, "ipf dst table lock"); ! strncpy(new->ipld_name, op->iplo_name, FR_GROUPLEN); unit = op->iplo_unit; new->ipld_unit = unit; --- 867,871 ---- MUTEX_INIT(&new->ipld_lock, "ipf dst table lock"); ! (void) strncpy(new->ipld_name, op->iplo_name, FR_GROUPLEN); unit = op->iplo_unit; new->ipld_unit = unit; *************** *** 951,955 **** d->ipld_flags |= IPDST_DELETE; ! ipf_dstlist_table_deref(softc, softd, d); } --- 954,958 ---- d->ipld_flags |= IPDST_DELETE; ! (void) ipf_dstlist_table_deref(softc, softd, d); } *************** *** 996,999 **** --- 999,1003 ---- /* it if 0 has been reached. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static int ipf_dstlist_table_deref(softc, arg, table) *************** *** 1303,1306 **** --- 1307,1311 ---- /* There are currently no objects to expire in destination lists. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static void ipf_dstlist_expire(softc, arg) Index: fil.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/fil.c,v retrieving revision 1.68.2.57 retrieving revision 1.68.2.58 diff -C2 -d -r1.68.2.57 -r1.68.2.58 *** fil.c 20 Jul 2012 08:36:49 -0000 1.68.2.57 --- fil.c 13 Aug 2012 11:44:14 -0000 1.68.2.58 *************** *** 149,158 **** #define LBUMP(x) softc->x++ ! #define LBUMPD(x, y) do { softc->x.y++; DT(y); } while (0) static INLINE int ipf_check_ipf __P((fr_info_t *, frentry_t *, int)); static u_32_t ipf_checkcipso __P((fr_info_t *, u_char *, int)); static u_32_t ipf_checkripso __P((u_char *)); ! static u_32_t ipf_decaps __P((fr_info_t *, u_32_t, int)); #ifdef IPFILTER_LOG static frentry_t *ipf_dolog __P((fr_info_t *, u_32_t *)); --- 149,162 ---- #define LBUMP(x) softc->x++ ! #define LBUMPD(x, y) do { \ ! softc->x.y++; \ ! DT(y); \ ! _NOTE(CONSTCOND) \ ! } while(0) static INLINE int ipf_check_ipf __P((fr_info_t *, frentry_t *, int)); static u_32_t ipf_checkcipso __P((fr_info_t *, u_char *, int)); static u_32_t ipf_checkripso __P((u_char *)); ! static u_32_t ipf_decaps __P((fr_info_t *, u_32_t)); #ifdef IPFILTER_LOG static frentry_t *ipf_dolog __P((fr_info_t *, u_32_t *)); *************** *** 195,200 **** static INLINE int ipf_pr_tcpcommon __P((fr_info_t *)); static INLINE int ipf_pr_udpcommon __P((fr_info_t *)); ! static void ipf_rule_delete __P((ipf_main_softc_t *, frentry_t *f, ! int, int)); static void ipf_rule_expire_insert __P((ipf_main_softc_t *, frentry_t *, int)); --- 199,203 ---- static INLINE int ipf_pr_tcpcommon __P((fr_info_t *)); static INLINE int ipf_pr_udpcommon __P((fr_info_t *)); ! static void ipf_rule_delete __P((ipf_main_softc_t *, frentry_t *f)); static void ipf_rule_expire_insert __P((ipf_main_softc_t *, frentry_t *, int)); *************** *** 981,985 **** fin->fin_p = IPPROTO_ICMPV6; ! ipf_checkv6sum(fin); fin->fin_p = p; } --- 984,988 ---- fin->fin_p = IPPROTO_ICMPV6; ! (void) ipf_checkv6sum(fin); fin->fin_p = p; } *************** *** 1005,1009 **** fin->fin_p = IPPROTO_UDP; ! ipf_checkv6sum(fin); fin->fin_p = p; } --- 1008,1012 ---- fin->fin_p = IPPROTO_UDP; ! (void) ipf_checkv6sum(fin); fin->fin_p = p; } *************** *** 1029,1033 **** fin->fin_p = IPPROTO_TCP; ! ipf_checkv6sum(fin); fin->fin_p = p; } --- 1032,1036 ---- fin->fin_p = IPPROTO_TCP; ! (void) ipf_checkv6sum(fin); fin->fin_p = p; } *************** *** 1284,1287 **** --- 1287,1291 ---- fin->fin_flx |= FI_BAD; } + /*FALLTHROUGH*/ #endif case ICMP_SOURCEQUENCH : *************** *** 1318,1322 **** ipf_pr_short(fin, minicmpsz); ! ipf_checkv4sum(fin); } --- 1322,1326 ---- ipf_pr_short(fin, minicmpsz); ! (void) ipf_checkv4sum(fin); } *************** *** 1421,1424 **** --- 1425,1429 ---- */ /*fin->fin_flx |= FI_BAD*/; + fin->fin_flx = fin->fin_flx; /* LINT */ } else if (!(flags & (TH_RST|TH_SYN))) { fin->fin_flx |= FI_BAD; *************** *** 1544,1548 **** if (ipf_pr_tcpcommon(fin) == 0) ! ipf_checkv4sum(fin); } --- 1549,1553 ---- if (ipf_pr_tcpcommon(fin) == 0) ! (void) ipf_checkv4sum(fin); } *************** *** 1564,1568 **** if (ipf_pr_udpcommon(fin) == 0) ! ipf_checkv4sum(fin); } --- 1569,1573 ---- if (ipf_pr_udpcommon(fin) == 0) ! (void) ipf_checkv4sum(fin); } *************** *** 2001,2005 **** } else if (tag > 127) { /* Custom defined DOI */ ! ; } else { fin->fin_flx |= FI_BAD; --- 2006,2010 ---- } else if (tag > 127) { /* Custom defined DOI */ ! fin->fin_flx = fin->fin_flx; /* LINT */ } else { fin->fin_flx |= FI_BAD; *************** *** 2575,2579 **** if (FR_ISDECAPS(passt)) ! passt = ipf_decaps(fin, pass, fr->fr_icode); else passt = ipf_scanlist(fin, pass); --- 2580,2584 ---- if (FR_ISDECAPS(passt)) ! passt = ipf_decaps(fin, pass); else passt = ipf_scanlist(fin, pass); *************** *** 3066,3070 **** case 4 : if (ipf_nat_checkout(fin, &pass) == -1) { ! ; } else if ((softc->ipf_update_ipid != 0) && (v == 4)) { if (ipf_updateipid(fin) == -1) { --- 3071,3075 ---- case 4 : if (ipf_nat_checkout(fin, &pass) == -1) { ! pass = pass; /* LINT */ } else if ((softc->ipf_update_ipid != 0) && (v == 4)) { if (ipf_updateipid(fin) == -1) { *************** *** 3192,3196 **** mc = M_COPY(fin->fin_m); if (mc != NULL) ! ipf_fastroute(mc, &mc, fin, fdp); } --- 3197,3201 ---- mc = M_COPY(fin->fin_m); if (mc != NULL) ! (void) ipf_fastroute(mc, &mc, fin, fdp); } *************** *** 3206,3210 **** (fdp->fd_ptr != (struct ifnet *)-1)) { /* this is for to rules: */ ! ipf_fastroute(fin->fin_m, mp, fin, fdp); m = *mp = NULL; } --- 3211,3215 ---- (fdp->fd_ptr != (struct ifnet *)-1)) { /* this is for to rules: */ ! (void) ipf_fastroute(fin->fin_m, mp, fin, fdp); m = *mp = NULL; } *************** *** 3600,3605 **** /* Function: ipf_group_del */ /* Returns: int - number of rules deleted */ ! /* Parameters: softc(I) - pointer to soft context main structure */ ! /* group(I) - group name to delete */ /* fr(I) - filter rule from which group is referenced */ /* Write Locks: ipf_mutex */ --- 3605,3609 ---- /* Function: ipf_group_del */ /* Returns: int - number of rules deleted */ ! /* Parameters: group(I) - group name to delete */ /* fr(I) - filter rule from which group is referenced */ /* Write Locks: ipf_mutex */ *************** *** 3611,3616 **** /* ------------------------------------------------------------------------ */ void ! ipf_group_del(softc, group, fr) ! ipf_main_softc_t *softc; frgroup_t *group; frentry_t *fr; --- 3615,3619 ---- /* ------------------------------------------------------------------------ */ void ! ipf_group_del(group, fr) frgroup_t *group; frentry_t *fr; *************** *** 3789,3798 **** if (flags & FR_OUTQUE) { ! ipf_flushlist(softc, &flushed, &softc->ipf_rules[1][set]); ! ipf_flushlist(softc, &flushed, &softc->ipf_acct[1][set]); } if (flags & FR_INQUE) { ! ipf_flushlist(softc, &flushed, &softc->ipf_rules[0][set]); ! ipf_flushlist(softc, &flushed, &softc->ipf_acct[0][set]); } --- 3792,3801 ---- if (flags & FR_OUTQUE) { ! (void) ipf_flushlist(softc, &flushed,&softc->ipf_rules[1][set]); ! (void) ipf_flushlist(softc, &flushed, &softc->ipf_acct[1][set]); } if (flags & FR_INQUE) { ! (void) ipf_flushlist(softc, &flushed,&softc->ipf_rules[0][set]); ! (void) ipf_flushlist(softc, &flushed, &softc->ipf_acct[0][set]); } *************** *** 4050,4055 **** ifa = ipf_resolvenic(softc, fr->fr_names + fr->fr_sifpidx, v); ! ipf_ifpaddr(softc, v, fr->fr_satype, ifa, ! &fr->fr_src6, &fr->fr_smsk6); } if (fr->fr_datype != FRI_NORMAL && --- 4053,4058 ---- ifa = ipf_resolvenic(softc, fr->fr_names + fr->fr_sifpidx, v); ! (void) ipf_ifpaddr(softc, v, fr->fr_satype, ifa, ! &fr->fr_src6, &fr->fr_smsk6); } if (fr->fr_datype != FRI_NORMAL && *************** *** 4057,4062 **** ifa = ipf_resolvenic(softc, fr->fr_names + fr->fr_sifpidx, v); ! ipf_ifpaddr(softc, v, fr->fr_datype, ifa, ! &fr->fr_dst6, &fr->fr_dmsk6); } } --- 4060,4065 ---- ifa = ipf_resolvenic(softc, fr->fr_names + fr->fr_sifpidx, v); ! (void) ipf_ifpaddr(softc, v, fr->fr_datype, ifa, ! &fr->fr_dst6, &fr->fr_dmsk6); } } *************** *** 4127,4131 **** /* needs to be changed/updated. */ /* ------------------------------------------------------------------------ */ ! int ipf_sync(softc, ifp) ipf_main_softc_t *softc; --- 4130,4134 ---- /* needs to be changed/updated. */ /* ------------------------------------------------------------------------ */ ! void ipf_sync(softc, ifp) ipf_main_softc_t *softc; *************** *** 4155,4160 **** } RWLOCK_EXIT(&softc->ipf_mutex); - - return 0; } --- 4158,4161 ---- *************** *** 4460,4464 **** int error = 0, in, family, addrem, need_free = 0; frentry_t frd, *fp, *f, **fprev, **ftail; ! void *ptr, *uptr, *cptr; u_int *p, *pp; frgroup_t *fg; --- 4461,4465 ---- int error = 0, in, family, addrem, need_free = 0; frentry_t frd, *fp, *f, **fprev, **ftail; ! void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; *************** *** 4466,4470 **** ptr = NULL; - cptr = NULL; fg = NULL; fp = &frd; --- 4467,4470 ---- *************** *** 4576,4580 **** ptr = NULL; - cptr = NULL; if (FR_ISACCOUNT(fp->fr_flags)) --- 4576,4579 ---- *************** *** 5061,5065 **** } ! ipf_rule_delete(softc, f, unit, set); need_free = makecopy; --- 5060,5064 ---- } ! ipf_rule_delete(softc, f); need_free = makecopy; *************** *** 5124,5128 **** if (fp->fr_grp != NULL) { WRITE_ENTER(&softc->ipf_mutex); ! ipf_group_del(softc, fp->fr_grp, fp); RWLOCK_EXIT(&softc->ipf_mutex); } --- 5123,5127 ---- if (fp->fr_grp != NULL) { WRITE_ENTER(&softc->ipf_mutex); ! ipf_group_del(fp->fr_grp, fp); RWLOCK_EXIT(&softc->ipf_mutex); } *************** *** 5142,5147 **** /* f(I) - pointer to the rule being deleted */ /* ftail(I) - pointer to the pointer to f */ - /* unit(I) - device for which this is for */ - /* set(I) - 1 or 0 (filter set) */ /* */ /* This function attempts to do what it can to delete a filter rule: remove */ --- 5141,5144 ---- *************** *** 5151,5158 **** /* ------------------------------------------------------------------------ */ static void ! ipf_rule_delete(softc, f, unit, set) ipf_main_softc_t *softc; frentry_t *f; - int unit, set; { --- 5148,5154 ---- /* ------------------------------------------------------------------------ */ static void ! ipf_rule_delete(softc, f) ipf_main_softc_t *softc; frentry_t *f; { *************** *** 5511,5521 **** if (fr->fr_grp != NULL) ! ipf_group_del(softc, fr->fr_grp, fr); if (fr->fr_grphead != NULL) ! ipf_group_del(softc, fr->fr_grphead, fr); if (fr->fr_icmpgrp != NULL) ! ipf_group_del(softc, fr->fr_icmpgrp, fr); if ((fr->fr_flags & FR_COPIED) != 0) { --- 5507,5517 ---- if (fr->fr_grp != NULL) ! ipf_group_del(fr->fr_grp, fr); if (fr->fr_grphead != NULL) ! ipf_group_del(fr->fr_grphead, fr); if (fr->fr_icmpgrp != NULL) ! ipf_group_del(fr->fr_icmpgrp, fr); if ((fr->fr_flags & FR_COPIED) != 0) { *************** *** 6202,6207 **** case IPL_LOGSYNC : if (softc->ipf_running > 0) { ! error = ipf_sync_ioctl(softc, data, cmd, mode, ! uid, ctx); } else { error = EIO; --- 6198,6202 ---- case IPL_LOGSYNC : if (softc->ipf_running > 0) { ! error = ipf_sync_ioctl(softc, data, cmd); } else { error = EIO; *************** *** 6223,6228 **** case IPL_LOGLOOKUP : if (softc->ipf_running > 0) { ! error = ipf_lookup_ioctl(softc, data, cmd, mode, ! uid, ctx); } else { error = EIO; --- 6218,6222 ---- case IPL_LOGLOOKUP : if (softc->ipf_running > 0) { ! error = ipf_lookup_ioctl(softc, data, cmd, uid, ctx); } else { error = EIO; *************** *** 7519,7523 **** break; ! ipf_token_deref(softc, it); } RWLOCK_EXIT(&softc->ipf_tokens); --- 7513,7517 ---- break; ! (void) ipf_token_deref(softc, it); } RWLOCK_EXIT(&softc->ipf_tokens); *************** *** 7583,7587 **** uid == it->ipt_uid) { it->ipt_complete = 2; ! ipf_token_deref(softc, it); error = 0; break; --- 7577,7581 ---- uid == it->ipt_uid) { it->ipt_complete = 2; ! (void) ipf_token_deref(softc, it); error = 0; break; *************** *** 8000,8004 **** error = ipf_getnextrule(softc, token, data); WRITE_ENTER(&softc->ipf_tokens); ! ipf_token_deref(softc, token); RWLOCK_EXIT(&softc->ipf_tokens); } else { --- 7994,7998 ---- error = ipf_getnextrule(softc, token, data); WRITE_ENTER(&softc->ipf_tokens); ! (void) ipf_token_deref(softc, token); RWLOCK_EXIT(&softc->ipf_tokens); } else { *************** *** 8076,8080 **** error = ipf_geniter(softc, token, &iter); WRITE_ENTER(&softc->ipf_tokens); ! ipf_token_deref(softc, token); RWLOCK_EXIT(&softc->ipf_tokens); } else { --- 8070,8074 ---- error = ipf_geniter(softc, token, &iter); WRITE_ENTER(&softc->ipf_tokens); ! (void) ipf_token_deref(softc, token); RWLOCK_EXIT(&softc->ipf_tokens); } else { *************** *** 8391,8395 **** /* Parameters: fin(I) - pointer to packet information */ /* pass(I) - IP protocol version to match */ - /* l5proto(I) - layer 5 protocol to decode UDP data as. */ /* */ /* This function is called for packets that are wrapt up in other packets, */ --- 8385,8388 ---- *************** *** 8400,8407 **** /* ------------------------------------------------------------------------ */ u_32_t ! ipf_decaps(fin, pass, l5proto) fr_info_t *fin; u_32_t pass; - int l5proto; { fr_info_t fin2, *fino = NULL; --- 8393,8399 ---- /* ------------------------------------------------------------------------ */ u_32_t ! ipf_decaps(fin, pass) fr_info_t *fin; u_32_t pass; { fr_info_t fin2, *fino = NULL; *************** *** 8554,8558 **** pass |= FR_BLOCK|FR_QUICK; fin->fin_reason = FRB_DECAPFRIP; ! return -1; } --- 8546,8550 ---- pass |= FR_BLOCK|FR_QUICK; fin->fin_reason = FRB_DECAPFRIP; ! return pass; } *************** *** 8789,8794 **** rv |= ((fin->fin_saddr & e->ipfe_arg0[i * 2 + 1]) == ! e->ipfe_arg0[i * 2]) || ! ((fin->fin_daddr & e->ipfe_arg0[i * 2 + 1]) == e->ipfe_arg0[i * 2]); --- 8781,8786 ---- rv |= ((fin->fin_saddr & e->ipfe_arg0[i * 2 + 1]) == ! e->ipfe_arg0[i * 2]); ! rv |= ((fin->fin_daddr & e->ipfe_arg0[i * 2 + 1]) == e->ipfe_arg0[i * 2]); *************** *** 8823,8828 **** rv |= IP6_MASKEQ(&fin->fin_src6, &e->ipfe_arg0[i * 8 + 4], ! &e->ipfe_arg0[i * 8]) || ! IP6_MASKEQ(&fin->fin_dst6, &e->ipfe_arg0[i * 8 + 4], &e->ipfe_arg0[i * 8]); --- 8815,8820 ---- rv |= IP6_MASKEQ(&fin->fin_src6, &e->ipfe_arg0[i * 8 + 4], ! &e->ipfe_arg0[i * 8]); ! rv |= IP6_MASKEQ(&fin->fin_dst6, &e->ipfe_arg0[i * 8 + 4], &e->ipfe_arg0[i * 8]); *************** *** 8834,8839 **** case IPF_EXP_TCP_PORT : for (i = 0; !rv && i < e->ipfe_narg; i++) { ! rv |= (fin->fin_sport == e->ipfe_arg0[i]) || ! (fin->fin_dport == e->ipfe_arg0[i]); } break; --- 8826,8831 ---- case IPF_EXP_TCP_PORT : for (i = 0; !rv && i < e->ipfe_narg; i++) { ! rv |= ((fin->fin_sport == e->ipfe_arg0[i]) || ! (fin->fin_dport == e->ipfe_arg0[i])); } break; *************** *** 9723,9727 **** if (fr->fr_die > softc->ipf_ticks) break; ! ipf_rule_delete(softc, fr, IPL_LOGIPF, 0); } --- 9715,9719 ---- if (fr->fr_die > softc->ipf_ticks) break; ! ipf_rule_delete(softc, fr); } *************** *** 9733,9737 **** if (fr->fr_die > softc->ipf_ticks) break; ! ipf_rule_delete(softc, fr, IPL_LOGIPF, 1); } --- 9725,9729 ---- if (fr->fr_die > softc->ipf_ticks) break; ! ipf_rule_delete(softc, fr); } *************** *** 9992,9995 **** --- 9984,9988 ---- /* Free an actual host_node_t structure. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ void ipf_rb_ht_freenode(node, arg) Index: ip_netbios_pxy.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_netbios_pxy.c,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -C2 -d -r1.4.2.2 -r1.4.2.3 *** ip_netbios_pxy.c 27 Dec 2009 07:34:34 -0000 1.4.2.2 --- ip_netbios_pxy.c 13 Aug 2012 11:44:15 -0000 1.4.2.3 *************** *** 67,70 **** --- 67,71 ---- + /*ARGSUSED*/ int ipf_p_netbios_out(arg, fin, aps, nat) Index: ip_htable.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_htable.c,v retrieving revision 1.17.2.16 retrieving revision 1.17.2.17 diff -C2 -d -r1.17.2.16 -r1.17.2.17 *** ip_htable.c 6 Jul 2012 14:35:36 -0000 1.17.2.16 --- ip_htable.c 13 Aug 2012 11:44:15 -0000 1.17.2.17 *************** *** 60,64 **** static iphtent_t *ipf_iphmfind __P((iphtable_t *, struct in_addr *)); static int ipf_iphmfindip __P((ipf_main_softc_t *, void *, int, void *, u_int)); ! static int ipf_htable_clear __P((ipf_main_softc_t *, void *, iphtable_t *)); static int ipf_htable_create __P((ipf_main_softc_t *, void *, iplookupop_t *)); static int ipf_htable_deref __P((ipf_main_softc_t *, void *, void *)); --- 60,64 ---- static iphtent_t *ipf_iphmfind __P((iphtable_t *, struct in_addr *)); static int ipf_iphmfindip __P((ipf_main_softc_t *, void *, int, void *, u_int)); ! static int ipf_htable_clear __P((void *, iphtable_t *)); static int ipf_htable_create __P((ipf_main_softc_t *, void *, iplookupop_t *)); static int ipf_htable_deref __P((ipf_main_softc_t *, void *, void *)); *************** *** 91,96 **** static int ipf_htent_insert __P((ipf_main_softc_t *, void *, iphtable_t *, iphtent_t *)); ! static int ipf_htent_remove __P((ipf_main_softc_t *, void *, iphtable_t *, ! iphtent_t *)); static void *ipf_htable_select_add_ref __P((void *, int, char *)); static void ipf_htable_expire __P((ipf_main_softc_t *, void *)); --- 91,95 ---- static int ipf_htent_insert __P((ipf_main_softc_t *, void *, iphtable_t *, iphtent_t *)); ! static int ipf_htent_remove __P((void *, iphtable_t *, iphtent_t *)); static void *ipf_htable_select_add_ref __P((void *, int, char *)); static void ipf_htable_expire __P((ipf_main_softc_t *, void *)); *************** *** 163,166 **** --- 162,166 ---- /* up the pool context too. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static void ipf_htable_soft_destroy(softc, arg) *************** *** 182,185 **** --- 182,186 ---- /* Initialise the hash table ready for use. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static int ipf_htable_soft_init(softc, arg) *************** *** 218,222 **** fop.iplf_count = 0; *fop.iplf_name = '\0'; ! ipf_htable_flush(softc, arg, &fop); } --- 219,223 ---- fop.iplf_count = 0; *fop.iplf_name = '\0'; ! (void) ipf_htable_flush(softc, arg, &fop); } *************** *** 430,439 **** if (iph->iph_ref != 0) { ! ipf_htable_clear(softc, arg, iph); iph->iph_flags |= IPHASH_DELETE; return 0; } ! ipf_htable_remove(softc, arg, iph); return 0; --- 431,440 ---- if (iph->iph_ref != 0) { ! (void) ipf_htable_clear(arg, iph); iph->iph_flags |= IPHASH_DELETE; return 0; } ! (void) ipf_htable_remove(softc, arg, iph); return 0; *************** *** 444,449 **** /* Function: ipf_htable_clear */ /* Returns: int - 0 = success, else error */ ! /* Parameters: softc(I) - pointer to soft context main structure */ ! /* arg(I) - pointer to local context to use */ /* iph(I) - pointer to hash table to destroy */ /* */ --- 445,449 ---- /* Function: ipf_htable_clear */ /* Returns: int - 0 = success, else error */ ! /* Parameters: arg(I) - pointer to local context to use */ /* iph(I) - pointer to hash table to destroy */ /* */ *************** *** 452,457 **** /* ------------------------------------------------------------------------ */ static int ! ipf_htable_clear(softc, arg, iph) ! ipf_main_softc_t *softc; void *arg; iphtable_t *iph; --- 452,456 ---- /* ------------------------------------------------------------------------ */ static int ! ipf_htable_clear(arg, iph) void *arg; iphtable_t *iph; *************** *** 460,464 **** while ((ipe = iph->iph_list) != NULL) ! if (ipf_htent_remove(softc, arg, iph, ipe) != 0) return 1; return 0; --- 459,463 ---- while ((ipe = iph->iph_list) != NULL) ! if (ipf_htent_remove(arg, iph, ipe) != 0) return 1; return 0; *************** *** 511,515 **** { ! if (ipf_htable_clear(softc, arg, iph) != 0) return 1; --- 510,514 ---- { ! if (ipf_htable_clear(arg, iph) != 0) return 1; *************** *** 573,577 **** } ! err = ipf_htent_remove(softc, arg, iph, ent); return err; --- 572,576 ---- } ! err = ipf_htent_remove(arg, iph, ent); return err; *************** *** 609,614 **** /* Function: ipf_htent_remove */ /* Returns: int - 0 = success, else error */ ! /* Parameters: softc(I) - pointer to soft context main structure */ ! /* arg(I) - pointer to local context to use */ /* iph(I) - pointer to hash table */ /* ipe(I) - pointer to hash table entry to remove */ --- 608,612 ---- /* Function: ipf_htent_remove */ /* Returns: int - 0 = success, else error */ ! /* Parameters: arg(I) - pointer to local context to use */ /* iph(I) - pointer to hash table */ /* ipe(I) - pointer to hash table entry to remove */ *************** *** 617,622 **** /* ------------------------------------------------------------------------ */ static int ! ipf_htent_remove(softc, arg, iph, ipe) ! ipf_main_softc_t *softc; void *arg; iphtable_t *iph; --- 615,619 ---- /* ------------------------------------------------------------------------ */ static int ! ipf_htent_remove(arg, iph, ipe) void *arg; iphtable_t *iph; *************** *** 652,656 **** case IPHASH_GROUPMAP : if (ipe->ipe_group != NULL) ! ipf_group_del(softc, ipe->ipe_ptr, NULL); break; --- 649,653 ---- case IPHASH_GROUPMAP : if (ipe->ipe_group != NULL) ! ipf_group_del(ipe->ipe_ptr, NULL); break; *************** *** 673,676 **** --- 670,674 ---- /* */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ static int ipf_htable_deref(softc, arg, object) *************** *** 1045,1049 **** iphtent_t ipe, *ent; u_int hv; - int bits; bcopy((char *)ipeo, (char *)&ipe, sizeof(ipe)); --- 1043,1046 ---- *************** *** 1053,1057 **** ipe.ipe_addr.i6[3] &= ipe.ipe_mask.i6[3]; if (ipe.ipe_family == AF_INET) { - bits = count4bits(ipe.ipe_mask.in4_addr); ipe.ipe_addr.i6[1] = 0; ipe.ipe_addr.i6[2] = 0; --- 1050,1053 ---- *************** *** 1065,1069 **** #ifdef USE_INET6 if (ipe.ipe_family == AF_INET6) { - bits = count6bits(ipe.ipe_mask.i6); hv = IPE_V6_HASH_FN(ipe.ipe_addr.i6, ipe.ipe_mask.i6, iph->iph_size); --- 1061,1064 ---- *************** *** 1312,1316 **** if (iph != NULL) { WRITE_ENTER(&softc->ipf_poolrw); ! ipf_htable_deref(softc, softh, iph); RWLOCK_EXIT(&softc->ipf_poolrw); } --- 1307,1311 ---- if (iph != NULL) { WRITE_ENTER(&softc->ipf_poolrw); ! (void) ipf_htable_deref(softc, softh, iph); RWLOCK_EXIT(&softc->ipf_poolrw); } *************** *** 1325,1329 **** if (node != NULL) { WRITE_ENTER(&softc->ipf_poolrw); ! ipf_htent_deref(softc, node); RWLOCK_EXIT(&softc->ipf_poolrw); } --- 1320,1324 ---- if (node != NULL) { WRITE_ENTER(&softc->ipf_poolrw); ! (void) ipf_htent_deref(softc, node); RWLOCK_EXIT(&softc->ipf_poolrw); } *************** *** 1366,1374 **** { case IPFLOOKUPITER_LIST : ! ipf_htable_deref(softc, arg, (iphtable_t *)data); break; case IPFLOOKUPITER_NODE : ! ipf_htent_deref(arg, (iphtent_t *)data); break; default : --- 1361,1369 ---- { case IPFLOOKUPITER_LIST : ! (void) ipf_htable_deref(softc, arg, (iphtable_t *)data); break; case IPFLOOKUPITER_NODE : ! (void) ipf_htent_deref(arg, (iphtent_t *)data); break; default : *************** *** 1437,1441 **** break; ! ipf_htent_remove(softc, softh, n->ipe_owner, n); } } --- 1432,1436 ---- break; ! (void) ipf_htent_remove(softh, n->ipe_owner, n); } } Index: ip_sync.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_sync.c,v retrieving revision 1.19.2.9 retrieving revision 1.19.2.10 diff -C2 -d -r1.19.2.9 -r1.19.2.10 *** ip_sync.c 22 Jul 2012 08:04:23 -0000 1.19.2.9 --- ip_sync.c 13 Aug 2012 11:44:15 -0000 1.19.2.10 *************** *** 182,185 **** --- 182,186 ---- /* any data structures, as required. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ int ipf_sync_soft_init(softc, arg) *************** *** 249,252 **** --- 250,254 ---- /* with the synchronisation tables. */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ int ipf_sync_soft_fini(softc, arg) *************** *** 257,262 **** if (softs->syncnattab != NULL) { ! ipf_sync_flush_table(softs, softs->ipf_sync_nat_tab_sz, ! softs->syncnattab); KFREES(softs->syncnattab, softs->ipf_sync_nat_tab_sz * sizeof(*softs->syncnattab)); --- 259,264 ---- if (softs->syncnattab != NULL) { ! (void) ipf_sync_flush_table(softs, softs->ipf_sync_nat_tab_sz, ! softs->syncnattab); KFREES(softs->syncnattab, softs->ipf_sync_nat_tab_sz * sizeof(*softs->syncnattab)); *************** *** 265,270 **** if (softs->syncstatetab != NULL) { ! ipf_sync_flush_table(softs, softs->ipf_sync_state_tab_sz, ! softs->syncstatetab); KFREES(softs->syncstatetab, softs->ipf_sync_state_tab_sz * --- 267,272 ---- if (softs->syncstatetab != NULL) { ! (void) ipf_sync_flush_table(softs, softs->ipf_sync_state_tab_sz, ! softs->syncstatetab); KFREES(softs->syncstatetab, softs->ipf_sync_state_tab_sz * *************** *** 296,299 **** --- 298,302 ---- } + /*ARGSUSED*/ void ipf_sync_soft_destroy(softc, arg) *************** *** 568,572 **** /* no more data */ ! return 0; } --- 571,575 ---- /* no more data */ ! return err; } *************** *** 746,750 **** if (softs->ipf_sync_debug > 4) ! printf("[%d] Filter rules = %p\n", sp->sm_num, fr); is->is_rule = fr; --- 749,753 ---- if (softs->ipf_sync_debug > 4) ! printf("[%d] Filter rule = %p\n", sp->sm_num,(void*)fr); is->is_rule = fr; *************** *** 764,768 **** softs->syncstatetab[hv] = sl; MUTEX_DOWNGRADE(&softs->ipf_syncstate); ! ipf_state_insert(softc, is, sp->sm_rev); /* * Do not initialise the interface pointers for the state --- 767,771 ---- softs->syncstatetab[hv] = sl; MUTEX_DOWNGRADE(&softs->ipf_syncstate); ! (void) ipf_state_insert(softc, is, sp->sm_rev); /* * Do not initialise the interface pointers for the state *************** *** 938,942 **** synclist_t *sl; u_int hv = 0; ! int err; READ_ENTER(&softs->ipf_syncnat); --- 941,945 ---- synclist_t *sl; u_int hv = 0; ! int err = 0; READ_ENTER(&softs->ipf_syncnat); *************** *** 1015,1019 **** RWLOCK_EXIT(&softs->ipf_syncnat); ! return 0; } --- 1018,1022 ---- RWLOCK_EXIT(&softs->ipf_syncnat); ! return err; } *************** *** 1299,1308 **** /* ------------------------------------------------------------------------ */ int ! ipf_sync_ioctl(softc, data, cmd, mode, uid, ctx) ipf_main_softc_t *softc; caddr_t data; ioctlcmd_t cmd; - int mode, uid; - void *ctx; { ipf_sync_softc_t *softs = softc->ipf_sync_soft; --- 1302,1309 ---- /* ------------------------------------------------------------------------ */ int ! ipf_sync_ioctl(softc, data, cmd) ipf_main_softc_t *softc; caddr_t data; ioctlcmd_t cmd; { ipf_sync_softc_t *softs = softc->ipf_sync_soft; *************** *** 1398,1401 **** --- 1399,1403 ---- /* XXX Maybe this should return false if the sync table is full? */ /* ------------------------------------------------------------------------ */ + /*ARGSUSED*/ int ipf_sync_canwrite(arg) Index: ip_fil_solaris.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_fil_solaris.c,v retrieving revision 1.27.2.22 retrieving revision 1.27.2.23 diff -C2 -d -r1.27.2.22 -r1.27.2.23 *** ip_fil_solaris.c 22 Jul 2012 08:04:23 -0000 1.27.2.22 --- ip_fil_solaris.c 13 Aug 2012 11:44:14 -0000 1.27.2.23 *************** *** 147,151 **** --- 147,153 ---- ipf_main_softc_t *softc; { + #if SOLARIS2 <= 8 int i; + #endif #ifdef IPFDEBUG *************** *** 243,246 **** --- 245,249 ---- dev, cmd, data, mode, cp, rp); #endif + softc = GET_SOFTC(crgetzoneid(cp)); unit = getminor(dev); if (IPL_LOGMAX < unit) { *************** *** 249,254 **** } - softc = GET_SOFTC(crgetzoneid(cp)); - if (softc->ipf_running <= 0) { if (unit != IPL_LOGIPF && cmd != SIOCIPFINTERROR) { --- 252,255 ---- *************** *** 722,726 **** struct sockaddr_in sin[2]; net_ifaddr_t types[2]; - void *array; int error; --- 723,726 ---- *************** *** 745,749 **** int logical = 0; - array = sin; do { error = net_getlifaddr(softc->ipf_nd_v4, --- 745,748 ---- *************** *** 756,762 **** return error; } else { ! array = sin6; ! net_getlifaddr(softc->ipf_nd_v6, (phy_if_t)qifptr, 0, ! 2, types, sin6); } --- 755,762 ---- return error; } else { ! error = net_getlifaddr(softc->ipf_nd_v6, (phy_if_t)qifptr, 0, ! 2, types, sin6); ! if (error != 0) ! return error; } *************** *** 822,827 **** { ipf_main_softc_t *softc = fin->fin_main_soft; - ipstate_t *is; - nat_t *nat; u_short id; --- 822,825 ---- *************** *** 1136,1139 **** --- 1134,1138 ---- else dst6 = fin->fin_dst6.in6; + dstp = &dst6; } #endif *************** *** 1239,1243 **** { qpktinfo_t *qpi = fin->fin_qpi; ! int out = fin->fin_out, dpoff; char *ip; mb_t *m; --- 1238,1242 ---- { qpktinfo_t *qpi = fin->fin_qpi; ! int dpoff; char *ip; mb_t *m; *************** *** 1331,1335 **** } ! qp->qp_mb = *fin->fin_mp; if (fin->fin_v == 4) qp->qp_sap = 0x800; --- 1330,1337 ---- } ! if (m == fin->fin_m) ! qp->qp_mb = *fin->fin_mp; ! else ! qp->qp_mb = m; if (fin->fin_v == 4) qp->qp_sap = 0x800; *************** *** 1345,1349 **** net_inject_t inject; inject.ni_physical = (phy_if_t)fin->fin_ifp; ! inject.ni_packet = *fin->fin_mp; if (fin->fin_v == 4) { sin = (struct sockaddr_in *)&inject.ni_addr; --- 1347,1354 ---- net_inject_t inject; inject.ni_physical = (phy_if_t)fin->fin_ifp; ! if (m == fin->fin_m) ! inject.ni_packet = *fin->fin_mp; ! else ! inject.ni_packet = m; if (fin->fin_v == 4) { sin = (struct sockaddr_in *)&inject.ni_addr; *************** *** 1358,1362 **** sin6 = (struct sockaddr_in6 *)&inject.ni_addr; sin6->sin6_family = AF_INET6; ! memcpy(&sin6->sin6_addr, &fin->fin_dst6, sizeof(fin->fin_dst6)); if (fin->fin_out == 0) return net_inject(softc->ipf_nd_v6, NI_QUEUE_IN, &inject); --- 1363,1367 ---- sin6 = (struct sockaddr_in6 *)&inject.ni_addr; sin6->sin6_family = AF_INET6; ! (void) memcpy(&sin6->sin6_addr, &fin->fin_dst6, sizeof(fin->fin_dst6)); if (fin->fin_out == 0) return net_inject(softc->ipf_nd_v6, NI_QUEUE_IN, &inject); *************** *** 1366,1369 **** --- 1371,1375 ---- + /*ARGSUSED*/ static int ipf_sendpkt(softc, v, ifp, mb, ip, dstp) *************** *** 1388,1392 **** sin = (struct sockaddr_in *)&inject.ni_addr; sin->sin_family = AF_INET; ! memcpy(&sin->sin_addr, dstp, sizeof(sin->sin_addr)); return net_inject(softc->ipf_nd_v4, NI_DIRECT_OUT, &inject); } --- 1394,1398 ---- sin = (struct sockaddr_in *)&inject.ni_addr; sin->sin_family = AF_INET; ! (void) memcpy(&sin->sin_addr, dstp, sizeof(sin->sin_addr)); return net_inject(softc->ipf_nd_v4, NI_DIRECT_OUT, &inject); } *************** *** 1394,1398 **** sin6 = (struct sockaddr_in6 *)&inject.ni_addr; sin6->sin6_family = AF_INET6; ! memcpy(&sin6->sin6_addr, dstp, sizeof(sin6->sin6_addr)); return net_inject(softc->ipf_nd_v6, NI_DIRECT_OUT, &inject); #endif --- 1400,1404 ---- sin6 = (struct sockaddr_in6 *)&inject.ni_addr; sin6->sin6_family = AF_INET6; ! (void) memcpy(&sin6->sin6_addr, dstp, sizeof(sin6->sin6_addr)); return net_inject(softc->ipf_nd_v6, NI_DIRECT_OUT, &inject); #endif *************** *** 1453,1457 **** ipf_prependmbt(fr_info_t *fin, mblk_t *m) { ! mblk_t *o = NULL, *top; mblk_t *n = *fin->fin_mp; qpktinfo_t *qpi; --- 1459,1463 ---- ipf_prependmbt(fr_info_t *fin, mblk_t *m) { ! mblk_t *o = NULL; mblk_t *n = *fin->fin_mp; qpktinfo_t *qpi; *************** *** 1497,1500 **** --- 1503,1507 ---- + /*ARGSUSED*/ static void * ipf_routeto(fin, v, dstip) *************** *** 1509,1513 **** struct sockaddr *sock; net_handle_t proto; - int result; switch (fin->fin_v) --- 1516,1519 ---- Index: ip_state.c =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/ip_state.c,v retrieving revision 1.48.2.24 retrieving revision 1.48.2.25 diff -C2 -d -r1.48.2.24 -r1.48.2.25 *** ip_state.c 20 Jul 2012 07:39:10 -0000 1.48.2.24 --- ip_state.c 13 Aug 2012 11:44:15 -0000 1.48.2.25 *************** *** 145,150 **** #define SINCL(x) ATOMIC_INCL(softs->x) #define SBUMP(x) (softs->x)++ ! #define SBUMPD(x, y) do { (softs->x.y)++; DT(y); } while (0) ! #define SBUMPDX(x, y, z)do { (softs->x.y)++; DT(z); } while (0) #ifdef USE_INET6 --- 145,159 ---- #define SINCL(x) ATOMIC_INCL(softs->x) #define SBUMP(x) (softs->x)++ ! #define SBUMPD(x, y) do { \ ! (softs->x.y)++; \ ! DT(y); \ ! _NOTE(CONSTCOND) \ ! } while (0) ! #define SBUMPDX(x, y, z) \ ! do { \ ! (softs->x.y)++; \ ! DT(z); \ ! _NOTE(CONSTCOND) \ ! } while (0) #ifdef USE_INET6 *************** *** 292,296 **** if (softs->ipf_state_tune != NULL) { ! ipf_tune_array_unlink(softc, softs->ipf_state_tune); KFREES(softs->ipf_state_tune, sizeof(ipf_state_tuneables)); softs->ipf_state_tune = NULL; --- 301,305 ---- if (softs->ipf_state_tune != NULL) { ! (void) ipf_tune_array_unlink(softc, softs->ipf_state_tune); KFREES(softs->ipf_state_tune, sizeof(ipf_state_tuneables)); softs->ipf_state_tune = NULL; *************** *** 427,431 **** while ((is = softs->ipf_state_list) != NULL) ! ipf_state_del(softc, is, ISL_UNLOAD); /* --- 436,440 ---- while ((is = softs->ipf_state_list) != NULL) ! (void) ipf_state_del(softc, is, ISL_UNLOAD); /* *************** *** 563,567 **** !bcmp((caddr_t)&sp->is_ps, (caddr_t)&st.is_ps, sizeof(st.is_ps))) { ! ipf_state_del(softc, sp, ISL_REMOVE); RWLOCK_EXIT(&softc->ipf_state); return 0; --- 572,576 ---- !bcmp((caddr_t)&sp->is_ps, (caddr_t)&st.is_ps, sizeof(st.is_ps))) { ! (void) ipf_state_del(softc, sp, ISL_REMOVE); RWLOCK_EXIT(&softc->ipf_state); return 0; *************** *** 790,794 **** error = ipf_state_iter(softc, token, &iter, &obj); WRITE_ENTER(&softc->ipf_tokens); ! ipf_token_deref(softc, token); RWLOCK_EXIT(&softc->ipf_tokens); } else { --- 799,803 ---- error = ipf_state_iter(softc, token, &iter, &obj); WRITE_ENTER(&softc->ipf_tokens); ! (void) ipf_token_deref(softc, token); RWLOCK_EXIT(&softc->ipf_tokens); } else { *************** *** 916,921 **** ipstate_t *is, *isn; ipstate_save_t ips; - int error, out, i; frentry_t *fr; char *name; --- 925,930 ---- ipstate_t *is, *isn; ipstate_save_t ips; frentry_t *fr; + int error, i; char *name; *************** *** 962,966 **** } bcopy((char *)&ips.ips_fr, (char *)fr, sizeof(*fr)); - out = fr->fr_flags & FR_OUTQUE ? 1 : 0; isn->is_rule = fr; ips.ips_is.is_rule = fr; --- 971,974 ---- *************** *** 1783,1789 **** fr->fr_names[fr->fr_ifnames[out << 1] + 1] == '\0')) { is->is_ifp[out << 1] = fr->fr_ifas[0]; ! strncpy(is->is_ifname[out << 1], ! fr->fr_names + fr->fr_ifnames[0], ! sizeof(fr->fr_ifnames[0])); } else { is->is_ifp[out << 1] = fin->fin_ifp; --- 1791,1797 ---- fr->fr_names[fr->fr_ifnames[out << 1] + 1] == '\0')) { is->is_ifp[out << 1] = fr->fr_ifas[0]; ! (void) strncpy(is->is_ifname[out << 1], ! fr->fr_names + fr->fr_ifnames[0], ! sizeof(fr->fr_ifnames[0])); } else { is->is_ifp[out << 1] = fin->fin_ifp; *************** *** 1794,1814 **** is->is_ifp[(out << 1) + 1] = fr->fr_ifas[1]; if (fr->fr_ifnames[1] != -1) { ! strncpy(is->is_ifname[(out << 1) + 1], ! fr->fr_names + fr->fr_ifnames[1], ! sizeof(fr->fr_ifnames[1])); } is->is_ifp[(1 - out) << 1] = fr->fr_ifas[2]; if (fr->fr_ifnames[2] != -1) { ! strncpy(is->is_ifname[((1 - out) << 1)], ! fr->fr_names + fr->fr_ifnames[2], ! sizeof(fr->fr_ifnames[2])); } is->is_ifp[((1 - out) << 1) + 1] = fr->fr_ifas[3]; if (fr->fr_ifnames[3] != -1) { ! strncpy(is->is_ifname[((1 - out) << 1) + 1], ! fr->fr_names + fr->fr_ifnames[3], ! sizeof(fr->fr_ifnames[3])); } } else { --- 1802,1822 ---- is->is_ifp[(out << 1) + 1] = fr->fr_ifas[1]; if (fr->fr_ifnames[1] != -1) { ! (void) strncpy(is->is_ifname[(out << 1) + 1], ! fr->fr_names + fr->fr_ifnames[1], ! sizeof(fr->fr_ifnames[1])); } is->is_ifp[(1 - out) << 1] = fr->fr_ifas[2]; if (fr->fr_ifnames[2] != -1) { ! (void) strncpy(is->is_ifname[((1 - out) << 1)], ! fr->fr_names + fr->fr_ifnames[2], ! sizeof(fr->fr_ifnames[2])); } is->is_ifp[((1 - out) << 1) + 1] = fr->fr_ifas[3]; if (fr->fr_ifnames[3] != -1) { ! (void) strncpy(is->is_ifname[((1 - out) << 1) + 1], ! fr->fr_names + fr->fr_ifnames[3], ! sizeof(fr->fr_ifnames[3])); } } else { *************** *** 1843,1848 **** fdp = &fr->fr_tifs[0]; if (fdp->fd_type == FRD_DSTLIST) { ! ipf_dstlist_select_node(fin, fdp->fd_ptr, NULL, ! &is->is_tifs[0]); } else { bcopy(fdp, &is->is_tifs[0], sizeof(*fdp)); --- 1851,1856 ---- fdp = &fr->fr_tifs[0]; if (fdp->fd_type == FRD_DSTLIST) { ! (void) ipf_dstlist_select_node(fin, fdp->fd_ptr, NULL, ! &is->is_tifs[0]); } else { bcopy(fdp, &is->is_tifs[0], sizeof(*fdp)); *************** *** 1851,1856 **** fdp = &fr->fr_tifs[1]; if (fdp->fd_type == FRD_DSTLIST) { ! ipf_dstlist_select_node(fin, fdp->fd_ptr, NULL, ! &is->is_tifs[1]); } else { bcopy(fdp, &is->is_tifs[1], sizeof(*fdp)); --- 1859,1864 ---- fdp = &fr->fr_tifs[1]; if (fdp->fd_type == FRD_DSTLIST) { ! (void) ipf_dstlist_select_node(fin, fdp->fd_ptr, NULL, ! &is->is_tifs[1]); } else { bcopy(fdp, &is->is_tifs[1], sizeof(*fdp)); *************** *** 1860,1865 **** fdp = &fr->fr_dif; if (fdp->fd_type == FRD_DSTLIST) { ! ipf_dstlist_select_node(fin, fdp->fd_ptr, NULL, ! &is->is_dif); } else { bcopy(fdp, &is->is_dif, sizeof(*fdp)); --- 1868,1873 ---- fdp = &fr->fr_dif; if (fdp->fd_type == FRD_DSTLIST) { ! (void) ipf_dstlist_select_node(fin, fdp->fd_ptr, NULL, ! &is->is_tifs[1]); } else { bcopy(fdp, &is->is_dif, sizeof(*fdp)); *************** *** 2254,2262 **** inseq = 1; } else if (!(flags & IS_TCPFSM)) { int i; i = (fin->fin_rev << 1) + fin->fin_out; ... [truncated message content] |