X-Git-Url: http://developer.intra2net.com/git/?p=ipt_ACCOUNT;a=blobdiff_plain;f=linux%2Fnet%2Fipv4%2Fnetfilter%2Fipt_ACCOUNT.c;h=a6c522c60c3a481da4d4434d4744e1f54ccd11cb;hp=a64167001fd34020689c1f65bfc08413abcc66a1;hb=2b0e65049cfe401009ff95432a121eba358427f6;hpb=8bea9bf9644c8c38cc956c667b4026ab8b9b80d0 diff --git a/linux/net/ipv4/netfilter/ipt_ACCOUNT.c b/linux/net/ipv4/netfilter/ipt_ACCOUNT.c index a641670..a6c522c 100644 --- a/linux/net/ipv4/netfilter/ipt_ACCOUNT.c +++ b/linux/net/ipv4/netfilter/ipt_ACCOUNT.c @@ -138,7 +138,7 @@ static int ipt_acc_table_insert(char *name, u_int32_t ip, u_int32_t netmask) /* Found free slot */ if (ipt_acc_tables[i].name[0] == 0) { u_int32_t calc_mask, netsize=0; - int j; /* needs to be unsigned, otherwise we risk endless loop */ + int j; /* needs to be signed, otherwise we risk endless loop */ DEBUGP("ACCOUNT: Found free slot: %d\n", i); strncpy (ipt_acc_tables[i].name, name, ACCOUNT_TABLE_NAME_LEN-1); @@ -414,9 +414,9 @@ static void ipt_acc_depth2_insert(struct ipt_acc_mask_8 *mask_8, } static unsigned int ipt_acc_target(struct sk_buff **pskb, - unsigned int hooknum, const struct net_device *in, const struct net_device *out, + unsigned int hooknum, const void *targinfo, void *userinfo) { @@ -592,7 +592,8 @@ static int ipt_acc_handle_prepare_read(char *tablename, (struct ipt_acc_mask_8 *)ipt_acc_tables[table_nr].data; struct ipt_acc_mask_8 *network_8 = (struct ipt_acc_mask_8 *)dest->data; - u_int32_t a; + struct ipt_acc_mask_16 *src_16, *network_16; + u_int32_t a, b; for (a = 0; a <= 255; a++) { if (src_8->mask_16[a]) { @@ -607,9 +608,8 @@ static int ipt_acc_handle_prepare_read(char *tablename, memcpy(network_8->mask_16[a], src_8->mask_16[a], sizeof(struct ipt_acc_mask_16)); - struct ipt_acc_mask_16 *src_16 = src_8->mask_16[a]; - struct ipt_acc_mask_16 *network_16 = network_8->mask_16[a]; - u_int32_t b; + src_16 = src_8->mask_16[a]; + network_16 = network_8->mask_16[a]; for (b = 0; b <= 255; b++) { if (src_16->mask_24[b]) {