lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.00.0902122112280.670@fbirervta.pbzchgretzou.qr>
Date:	Thu, 12 Feb 2009 21:19:18 +0100 (CET)
From:	Jan Engelhardt <jengelh@...ozas.de>
To:	Evgeniy Polyakov <zbr@...emap.net>
cc:	Patrick McHardy <kaber@...sh.net>, netdev@...r.kernel.org,
	David Miller <davem@...emloft.net>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Netfilter Development Mailinglist 
	<netfilter-devel@...r.kernel.org>
Subject: Re: Passive OS fingerprint xtables match (iptables part)


On Thursday 2009-02-12 20:18, Evgeniy Polyakov wrote:
>On Thu, Feb 12, 2009 at 07:26:53PM +0100, Jan Engelhardt (jengelh@...ozas.de) 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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ