Re: [PATCH 06/18] netfilter: add protocol independant NAT core
From: Jan Engelhardt <hidden>
Date: 2012-08-22 22:48:19
Also in:
netfilter-devel
From: Jan Engelhardt <hidden>
Date: 2012-08-22 22:48:19
Also in:
netfilter-devel
On Thursday 2012-08-23 00:13, Patrick McHardy wrote:
quoted
quoted
+ 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?