On Tuesday 2009-10-27 11:49, Thomas Jarosch wrote: > >> @@ -817,7 +817,7 @@ static int ipt_acc_handle_get_data(uint32_t handle, >> void *to_user) struct ipt_acc_mask_24 *network = >> network_16->mask_24[b]; >> if (ipt_acc_handle_copy_data(to_user, &to_user_pos, >> - &tmpbuf_pos, network, net_ip, (b << 16))) >> + &tmpbuf_pos, network, ntohl(net_ip), (b << 16))) >> return -1; >> } >> } > >I'm starting to get my mind ready for endian issues :) >The "net_OR_mask" is in host order if I understood it correctly, >so shouldn't this read "(b << 8)"? Yes it should be <<8. Besides, "the 8 bit" comment is confusing, because both CIDR/8 and CIDR/24 have eight bits either way - just one has eight 1s, one has eight 0s. → /* 8 bit network */ → if (depth == 0) { → → struct ipt_acc_mask_24 *network = I am in the process of annotating the entire source with the BE markers and I am already getting into situations where I think "there's more bswapping amiss" -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html