Skip to contentSkip to conversation

C++ compile errors

DISCUSSION Amos Jeffries 2 participants 3 messages Jun 30, 2013 – Jul 1, 2013 netfilter

lore
Share & tools
lore
#1 lore raw

Hi Amos,

Quoted 3 lines · Amos Jeffries

Can anyone update me on whether this submission or an equivalent fix ever made it into the formal releases? and if so which ones?
https://lkml.org/lkml/2012/9/30/146

The solution for this is to cache the modified header (that compiles with C++) in your application source code tree. We cannot take changes to get C++ application compiling, sorry.

Regards.

#2 lore raw
Quoted 9 lines · Pablo Neira Ayuso

Hi Amos,

Quoted 3 lines · Amos Jeffries

Can anyone update me on whether this submission or an equivalent fix ever made it into the formal releases? and if so which ones?
https://lkml.org/lkml/2012/9/30/146

The solution for this is to cache the modified header (that compiles with C++) in your application source code tree. We cannot take changes to get C++ application compiling, sorry.

Really? The application I'm working with is only trying to use getsockopt() interface with IP6T_SO_ORIGINAL_DST. Nothing more.

/usr/include/linux/netfilter_ipv6/ip6_tables.h: In function 'xt_entry_target* ip 6t_get_target(ip6t_entry*)':
/usr/include/linux/netfilter_ipv6/ip6_tables.h:261:19: error: invalid conversion from 'void*' to 'xt_entry_target*' [-fpermissive]

  return (void *)e + e->target_offset;
                   ^

Restricting all users of the published headers to C-compilers is a bit annoying. Good way to prevent anyone using IPv6 with NAT though ;-)

Amos