On Thursday 2009-02-12 20:18, Evgeniy Polyakov wrote: >On Thu, Feb 12, 2009 at 07:26:53PM +0100, Jan Engelhardt (jengelh@xxxxxxxxxx) wrote: >> >#include <xtables.h> >> > >> >typedef unsigned int __u32; >> >typedef unsigned short __u16; >> >typedef unsigned char __u8; >> >> These should not done here.. it likely causes a "redefinition" >> warning or compile error of sorts. Include <linux/types.h> if >> in doubt. > >It does not since linux/types.h header is not included, but better use >existing header of course. Usually it happens to be slurped in via <xtables.h> or so; since many xt_foobar.h files use __u32 too and we do not have a problem with them, manually adding the typedefs seems redundant. >> > case '2': /* --ttl */ >> > if (*flags & IPT_OSF_TTL) >> > exit_error(PARAMETER_PROBLEM, "Can't specify multiple ttl parameter"); >> > *flags |= IPT_OSF_TTL; >> > info->flags |= IPT_OSF_TTL; >> > info->ttl = atoi(argv[optind-1]); >> >> Make use of xtables_strtoui to do bounds checking on the TTL value. > >Hmm... >$ grep xtables_strtoui -r /tmp/iptables-1.4.2 >$ It is going to be in 1.4.3, after whose release is the earliest point ipt_osf (or xt_osf :) will probably find its way into the mainlines. In 1.4.2, it is still called strtonum. >> > .save = &osf_save, >> > .extra_opts = osf_opts >> >> The & for function pointers is not needed (and actually makes >> macro substituion break in some cases, just in case I need >> an excuse) > >Well, having & clearly shows it is a pointer and not a value, especially >when it is not clear from the name what it should be. I think we're good - there is no & in any other extension. -- 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