Project

General

Profile

Bug #1365

Build error in connmark_listener.c on Centos 6.7

Added by Eric Germann over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
build
Target version:
Start date:
22.03.2016
Due date:
Estimated time:
Affected version:
5.4.0
Resolution:
Fixed

Description

Configure command is

./configure --enable-gcm --enable-gcrypt --enable-connmark --enable-openssl --enable-aesni


On build
make[4]: Entering directory `/source/strongswan-5.4.0/src/libcharon/plugins/connmark'
depbase=`echo connmark_listener.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../src/libstrongswan -I../../../../src/libcharon  -rdynamic  -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /source/strongswan-5.4.0/config.h -MT connmark_listener.lo -MD -MP -MF $depbase.Tpo -c -o connmark_listener.lo connmark_listener.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/libstrongswan -I../../../../src/libcharon -rdynamic -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /source/strongswan-5.4.0/config.h -MT connmark_listener.lo -MD -MP -MF .deps/connmark_listener.Tpo -c connmark_listener.c  -fPIC -DPIC -o .libs/connmark_listener.o
connmark_listener.c: In function 'manage_out':
connmark_listener.c:319: error: invalid application of 'sizeof' to incomplete type 'struct xt_mark_mtinfo1'
connmark_listener.c:346: error: invalid application of 'sizeof' to incomplete type 'struct xt_mark_mtinfo1'
connmark_listener.c:346: error: dereferencing pointer to incomplete type
connmark_listener.c:346: error: unknown field 'mask' specified in initializer
connmark_listener.c:346: warning: excess elements in struct initializer
connmark_listener.c:346: warning: (near initialization for '(anonymous)')
make[4]: *** [connmark_listener.lo] Error 1
make[4]: Leaving directory `/source/strongswan-5.4.0/src/libcharon/plugins/connmark'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/source/strongswan-5.4.0/src/libcharon'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/source/strongswan-5.4.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/source/strongswan-5.4.0'
make: *** [all] Error 2

Please let me know if you need additional information or files

connmark_listener.patch (507 Bytes) connmark_listener.patch Eric Germann, 23.03.2016 14:24

Associated revisions

Revision b39be996 (diff)
Added by Tobias Brunner over 4 years ago

connmark: Explicitly include xt_mark.h for older kernels

Fixes #1365.

History

#1 Updated by Tobias Brunner over 4 years ago

  • Status changed from New to Feedback

Please fix this issue yourself. Either find the include that defines that struct on your platform or remove the code that uses the stuff that's not supported by your ancient kernel/iptables/libiptc (CentOS 6.7 ships with a 2.6.32 kernel).

#2 Updated by Eric Germann over 4 years ago

It broke from 5.3.5 to 5.4.0. FTFY. See attached patch.

--- strongswan-5.4.0/src/libcharon/plugins/connmark/connmark_listener.c    2016-03-11 07:29:23.000000000 +0000
+++ strongswan-5.4.0-patched/src/libcharon/plugins/connmark/connmark_listener.c    2016-03-23 13:09:05.392998537 +0000
@@ -24,6 +24,7 @@
 #include <libiptc/libiptc.h>
 #include <linux/netfilter/xt_esp.h>
 #include <linux/netfilter/xt_tcpudp.h>
+#include <linux/netfilter/xt_mark.h>
 #include <linux/netfilter/xt_MARK.h>
 #include <linux/netfilter/xt_policy.h>
 #include <linux/netfilter/xt_CONNMARK.h>

EKG

Eric Germann wrote:

Configure command is

[...]
On build

[...]

Please let me know if you need additional information or files

#3 Updated by Tobias Brunner over 4 years ago

The linux/netfilter/xt_MARK.h header of more recent kernel versions basically only contains:

#include <linux/netfilter/xt_mark.h>

I guess that's not the case with these old kernel headers, which apparently require that additional explicit include.

#4 Updated by Eric Germann over 4 years ago

God created the world in 7 days because he didn't have an installed base to support ...

EKG

#5 Updated by Tobias Brunner over 4 years ago

  • Tracker changed from Issue to Bug
  • Status changed from Feedback to Closed
  • Assignee set to Tobias Brunner
  • Target version set to 5.5.0
  • Resolution set to Fixed

Also available in: Atom PDF