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.LNX.2.01.1208230045480.22098@frira.zrqbmnf.qr>
Date:	Thu, 23 Aug 2012 00:48:19 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...i.de>
To:	Patrick McHardy <kaber@...sh.net>
cc:	netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 06/18] netfilter: add protocol independant NAT core


On Thursday 2012-08-23 00:13, Patrick McHardy wrote:
>>> +	iph = (void *)skb->data + iphdroff;
>>
>> Is trying to avoid some GNU extensions a worthwhile goal? If so,
>> iph = (struct iphdr *)(skb->data + iphdroff) should be used, like in:
>
> I don't get your point.

You are doing arithmetic with a void* pointer, which is a GNU extension.
Should we try to limit "unnecessary excess usage" of GNU features?
You could do arithmetic with the char* that skb->data is:

 iph = (void *)(skb->data + iphdroff);

or, if more clarity is desired, the more verbose form

 iph = (struct iphdr *)(skb->data + iphdroff);

Does this seem like something worthwhile to passively pursue?
--
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