安装环境:
[devel@dev-1 ipsec-tools-0.8.0]$ uname -a
Linux dev-1 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
安装软件
[devel@dev-1 ipsec-tools-0.8.0]$ sudo yum install flex
[devel@dev-1 ipsec-tools-0.8.0]$ sudo yum install flex-devel
[devel@dev-1 ipsec-tools-0.8.0]$ sudo yum install bison
[devel@dev-1 ipsec-tools-0.8.0]$ sudo yum install bison-devel
下载ipsec-tools-0.8.0.tar.gz并解压
[devel@dev-1 ipsec-tools-0.8.0]$ ./configure --enable-stats --enable-hybrid --enable-shared --enable-frag --enable-adminport --enable-rc5 --enable-idea --enable-dpd --prefix=/usr --enable-security-context=no --with-kernel-headers=/usr/include --with-flexlib=-lfl
编译:
make
问题1:
ipsec_doi.c: In function ‘get_proppair_and_doi_sit’:
ipsec_doi.c:1186:24: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
memset(pair, 0, sizeof(pair));
解决1:
[devel@dev-1 ipsec-tools-0.8.0]$ vim ./src/racoon/ipsec_doi.c +1186
memset(pair, 0, sizeof(pair)); --> memset(pair, 0, sizeof(*pair));
最后:
sudo make install