[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

another bug in ipfilter/ipnat



Like earlier this week I've found another instance where byte ordering has
not been accounted for.

in /usr/src/sbin/ipnat/ipnat.c, procedure hostnum() near the end there is a
line: return np->n_net;
This needs to be wrapped htonl() like this:
return htonl(np->n_net);

I'm sorry I can not submit a patch. I'm going to mail Darren about it later
tonight. I think a lot of efficiency could be had if he'd collect these 
common routines together. ipf has the exact same procedure with what also
proved to be the exact same mistake. This is not smart. Plus there are 
inconsistancies like one of them returns a u_int while the others uses
u_32_t. Stuff like this is probably driving the Alpha users up the wall...