View | Details | Raw Unified | Return to bug 160401 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-12 / +73 lines)
Lines 5-48 Link Here
5
# $FreeBSD: ports/security/strongswan/Makefile,v 1.3 2011/04/29 12:24:55 culot Exp $
5
# $FreeBSD: ports/security/strongswan/Makefile,v 1.3 2011/04/29 12:24:55 culot Exp $
6
6
7
PORTNAME=	strongswan
7
PORTNAME=	strongswan
8
PORTVERSION=	4.5.1
8
PORTVERSION=	4.5.3
9
CATEGORIES=	security
9
CATEGORIES=	security
10
MASTER_SITES=	http://download.strongswan.org/ \
10
MASTER_SITES=	http://download.strongswan.org/ \
11
		http://download2.strongswan.org/
11
		http://download2.strongswan.org/
12
12
13
MAINTAINER=	riaank@gmail.com
13
MAINTAINER=	riaank@gmail.com
14
COMMENT=	Open Source IPSec-based VPN solution
14
COMMENT=	Open Source IKEv2 IPsec-based VPN solution
15
15
16
LIB_DEPENDS=	vstr:${PORTSDIR}/devel/vstr \
16
OPTIONS= SQLITE			"Enable SQLite" off \
17
				gmp.10:${PORTSDIR}/math/gmp
17
		MYSQL			"Enable MySQL" off \
18
		CURL			"Enable CURL to fetch CRL/OCSP" off \
19
		EAPAKA3GPP2		"Enable EAP AKA with 3gpp2 backend" off \
20
		EAPSIMFILE		"Enable EAP SIM with file backend" off
18
21
22
USE_RC_SUBR= strongswan.sh
19
USE_BZIP2=	yes
23
USE_BZIP2=	yes
20
21
USE_AUTOTOOLS=	libtool
24
USE_AUTOTOOLS=	libtool
22
GNU_CONFIGURE=	yes
25
GNU_CONFIGURE=	yes
26
USE_OPENSSL=	yes
23
USE_LDCONFIG=	yes
27
USE_LDCONFIG=	yes
28
24
CONFIGURE_ARGS=	--enable-kernel-pfkey \
29
CONFIGURE_ARGS=	--enable-kernel-pfkey \
25
		--enable-kernel-pfroute  \
30
		--enable-kernel-pfroute  \
26
		--disable-kernel-netlink  \
31
		--disable-kernel-netlink  \
27
		--disable-tools  \
32
		--disable-tools  \
28
		--disable-scripts  \
33
		--disable-scripts  \
29
		--disable-pluto  \
34
		--disable-pluto  \
35
		--disable-gmp \
36
		--enable-openssl \
37
		--enable-eap-identity \
38
		--enable-eap-md5 \
39
		--enable-eap-tls \
40
		--enable-eap-mschapv2 \
41
		--enable-md4 \
42
		--enable-blowfish \
43
		--enable-addrblock \
44
		--enable-whitelist \
30
		--with-group=wheel  \
45
		--with-group=wheel  \
31
		--enable-gmp \
32
		--enable-vstr \
33
		--with-lib-prefix=${PREFIX}
46
		--with-lib-prefix=${PREFIX}
34
47
35
MAN3=		anyaddr.3 atoaddr.3 atoasr.3 atoul.3 goodmask.3 \
48
# Man pages with default install
36
		initaddr.3 initsubnet.3 portof.3 rangetosubnet.3 \
37
		sameaddr.3 subnetof.3 ttoaddr.3 ttodata.3 \
38
		ttosa.3 ttoul.3
39
MAN5=		ipsec.conf.5 ipsec.secrets.5 strongswan.conf.5
49
MAN5=		ipsec.conf.5 ipsec.secrets.5 strongswan.conf.5
40
MAN8=		ipsec.8 _updown.8 _updown_espmark.8
50
MAN8=		ipsec.8
41
51
42
.include <bsd.port.pre.mk>
52
.include <bsd.port.pre.mk>
43
53
54
# Requires FreeBSD 8 and above to work
44
.if ${OSVERSION} < 800000
55
.if ${OSVERSION} < 800000
45
IGNORE=		requires at least FreeBSD 8.X
56
IGNORE=		requires at least FreeBSD 8.X
46
.endif
57
.endif
47
58
59
# Extra options
60
.if defined(WITH_SQLITE) || defined (WITH_MYSQL)
61
CONFIGURE_ARGS+=	--enable-attr-sql
62
CONFIGURE_ARGS+=	--enable-sql
63
PLIST_SUB+=	SQL=""
64
.else
65
PLIST_SUB+=	SQL="@comment "
66
.endif
67
68
.if defined(WITH_SQLITE)
69
CONFIGURE_ARGS+=	--enable-sqlite
70
LIB_DEPENDS += sqlite3.8:${PORTSDIR}/databases/sqlite3
71
PLIST_SUB+=	SQLITE=""
72
.else
73
PLIST_SUB+=	SQLITE="@comment "
74
.endif
75
76
.if defined(WITH_MYSQL)
77
CONFIGURE_ARGS+=	--enable-mysql
78
USE_MYSQL= yes
79
PLIST_SUB+=	MYSQL=""
80
.else
81
PLIST_SUB+=	MYSQL="@comment "
82
.endif
83
84
.if defined(WITH_CURL)
85
CONFIGURE_ARGS+=	--enable-curl
86
LIB_DEPENDS+=	curl.6:${PORTSDIR}/ftp/curl
87
PLIST_SUB+=	CURL=""
88
.else
89
PLIST_SUB+=	CURL="@comment "
90
.endif
91
92
.if defined(WITH_EAPSIMFILE)
93
CONFIGURE_ARGS+=	--enable-eap-sim
94
CONFIGURE_ARGS+=	--enable-eap-sim-file
95
PLIST_SUB+=	EAPSIMFILE=""
96
.else
97
PLIST_SUB+=	EAPSIMFILE="@comment "
98
.endif
99
100
.if defined(WITH_EAPAKA3GPP2)
101
CONFIGURE_ARGS+=	--enable-eap-aka
102
CONFIGURE_ARGS+=	--enable-eap-aka-3gpp2
103
LIB_DEPENDS+=    	gmp.10:${PORTSDIR}/math/gmp
104
PLIST_SUB+=	EAPAKA3GPP2=""
105
.else
106
PLIST_SUB+=	EAPAKA3GPP2="@comment "
107
.endif
108
48
.include <bsd.port.post.mk>
109
.include <bsd.port.post.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (strongswan-4.5.1.tar.bz2) = 252d7369d94aa2d79e6fad078853b07ca897ea811ab1e1a2b008bcec0d1e758a
1
SHA256 (strongswan-4.5.3.tar.bz2) = a59fa0d9820fb06a3c848f4537b9256d2067265ad10e1b007b79f3b16279f1ff
2
SIZE (strongswan-4.5.1.tar.bz2) = 3254264
2
SIZE (strongswan-4.5.3.tar.bz2) = 3299522
(-)pkg-plist (-97 / +146 lines)
Lines 1-101 Link Here
1
etc/ipsec.conf
1
etc/ipsec.conf
2
%%ETCDIR%%.conf
2
etc/strongswan.conf
3
lib/libcharon.a
3
lib/ipsec/libcharon.a
4
lib/libcharon.la
4
lib/ipsec/libcharon.la
5
lib/libcharon.so
5
lib/ipsec/libcharon.so
6
lib/libcharon.so.0
6
lib/ipsec/libcharon.so.0
7
lib/libhydra.a
7
lib/ipsec/libhydra.a
8
lib/libhydra.la
8
lib/ipsec/libhydra.la
9
lib/libhydra.so
9
lib/ipsec/libhydra.so
10
lib/libhydra.so.0
10
lib/ipsec/libhydra.so.0
11
lib/libstrongswan.a
11
lib/ipsec/libstrongswan.a
12
lib/libstrongswan.la
12
lib/ipsec/libstrongswan.la
13
lib/libstrongswan.so
13
lib/ipsec/libstrongswan.so
14
lib/libstrongswan.so.0
14
lib/ipsec/libstrongswan.so.0
15
lib/ipsec/plugins/libstrongswan-addrblock.a
16
lib/ipsec/plugins/libstrongswan-addrblock.la
17
lib/ipsec/plugins/libstrongswan-addrblock.so
18
lib/ipsec/plugins/libstrongswan-aes.a
19
lib/ipsec/plugins/libstrongswan-aes.la
20
lib/ipsec/plugins/libstrongswan-aes.so
21
lib/ipsec/plugins/libstrongswan-attr.a
22
lib/ipsec/plugins/libstrongswan-attr.la
23
lib/ipsec/plugins/libstrongswan-attr.so
24
lib/ipsec/plugins/libstrongswan-blowfish.a
25
lib/ipsec/plugins/libstrongswan-blowfish.la
26
lib/ipsec/plugins/libstrongswan-blowfish.so
27
lib/ipsec/plugins/libstrongswan-constraints.a
28
lib/ipsec/plugins/libstrongswan-constraints.la
29
lib/ipsec/plugins/libstrongswan-constraints.so
30
lib/ipsec/plugins/libstrongswan-des.a
31
lib/ipsec/plugins/libstrongswan-des.la
32
lib/ipsec/plugins/libstrongswan-des.so
33
lib/ipsec/plugins/libstrongswan-dnskey.a
34
lib/ipsec/plugins/libstrongswan-dnskey.la
35
lib/ipsec/plugins/libstrongswan-dnskey.so
36
lib/ipsec/plugins/libstrongswan-eap-identity.a
37
lib/ipsec/plugins/libstrongswan-eap-identity.la
38
lib/ipsec/plugins/libstrongswan-eap-identity.so
39
lib/ipsec/plugins/libstrongswan-eap-md5.a
40
lib/ipsec/plugins/libstrongswan-eap-md5.la
41
lib/ipsec/plugins/libstrongswan-eap-md5.so
42
lib/ipsec/plugins/libstrongswan-eap-mschapv2.a
43
lib/ipsec/plugins/libstrongswan-eap-mschapv2.la
44
lib/ipsec/plugins/libstrongswan-eap-mschapv2.so
45
lib/ipsec/plugins/libstrongswan-eap-tls.a
46
lib/ipsec/plugins/libstrongswan-eap-tls.la
47
lib/ipsec/plugins/libstrongswan-eap-tls.so
48
lib/ipsec/plugins/libstrongswan-fips-prf.a
49
lib/ipsec/plugins/libstrongswan-fips-prf.la
50
lib/ipsec/plugins/libstrongswan-fips-prf.so
51
lib/ipsec/plugins/libstrongswan-hmac.a
52
lib/ipsec/plugins/libstrongswan-hmac.la
53
lib/ipsec/plugins/libstrongswan-hmac.so
54
lib/ipsec/plugins/libstrongswan-kernel-pfkey.a
55
lib/ipsec/plugins/libstrongswan-kernel-pfkey.la
56
lib/ipsec/plugins/libstrongswan-kernel-pfkey.so
57
lib/ipsec/plugins/libstrongswan-kernel-pfroute.a
58
lib/ipsec/plugins/libstrongswan-kernel-pfroute.la
59
lib/ipsec/plugins/libstrongswan-kernel-pfroute.so
60
lib/ipsec/plugins/libstrongswan-md4.a
61
lib/ipsec/plugins/libstrongswan-md4.la
62
lib/ipsec/plugins/libstrongswan-md4.so
63
lib/ipsec/plugins/libstrongswan-md5.a
64
lib/ipsec/plugins/libstrongswan-md5.la
65
lib/ipsec/plugins/libstrongswan-md5.so
66
lib/ipsec/plugins/libstrongswan-openssl.a
67
lib/ipsec/plugins/libstrongswan-openssl.la
68
lib/ipsec/plugins/libstrongswan-openssl.so
69
lib/ipsec/plugins/libstrongswan-pem.a
70
lib/ipsec/plugins/libstrongswan-pem.la
71
lib/ipsec/plugins/libstrongswan-pem.so
72
lib/ipsec/plugins/libstrongswan-pgp.a
73
lib/ipsec/plugins/libstrongswan-pgp.la
74
lib/ipsec/plugins/libstrongswan-pgp.so
75
lib/ipsec/plugins/libstrongswan-pkcs1.a
76
lib/ipsec/plugins/libstrongswan-pkcs1.la
77
lib/ipsec/plugins/libstrongswan-pkcs1.so
78
lib/ipsec/plugins/libstrongswan-pubkey.a
79
lib/ipsec/plugins/libstrongswan-pubkey.la
80
lib/ipsec/plugins/libstrongswan-pubkey.so
81
lib/ipsec/plugins/libstrongswan-random.a
82
lib/ipsec/plugins/libstrongswan-random.la
83
lib/ipsec/plugins/libstrongswan-random.so
84
lib/ipsec/plugins/libstrongswan-resolve.a
85
lib/ipsec/plugins/libstrongswan-resolve.la
86
lib/ipsec/plugins/libstrongswan-resolve.so
87
lib/ipsec/plugins/libstrongswan-revocation.a
88
lib/ipsec/plugins/libstrongswan-revocation.la
89
lib/ipsec/plugins/libstrongswan-revocation.so
90
lib/ipsec/plugins/libstrongswan-sha1.a
91
lib/ipsec/plugins/libstrongswan-sha1.la
92
lib/ipsec/plugins/libstrongswan-sha1.so
93
lib/ipsec/plugins/libstrongswan-sha2.a
94
lib/ipsec/plugins/libstrongswan-sha2.la
95
lib/ipsec/plugins/libstrongswan-sha2.so
96
lib/ipsec/plugins/libstrongswan-socket-default.a
97
lib/ipsec/plugins/libstrongswan-socket-default.la
98
lib/ipsec/plugins/libstrongswan-socket-default.so
99
lib/ipsec/plugins/libstrongswan-stroke.a
100
lib/ipsec/plugins/libstrongswan-stroke.la
101
lib/ipsec/plugins/libstrongswan-stroke.so
102
lib/ipsec/plugins/libstrongswan-updown.a
103
lib/ipsec/plugins/libstrongswan-updown.la
104
lib/ipsec/plugins/libstrongswan-updown.so
105
lib/ipsec/plugins/libstrongswan-whitelist.a
106
lib/ipsec/plugins/libstrongswan-whitelist.la
107
lib/ipsec/plugins/libstrongswan-whitelist.so
108
lib/ipsec/plugins/libstrongswan-x509.a
109
lib/ipsec/plugins/libstrongswan-x509.la
110
lib/ipsec/plugins/libstrongswan-x509.so
111
lib/ipsec/plugins/libstrongswan-xcbc.a
112
lib/ipsec/plugins/libstrongswan-xcbc.la
113
lib/ipsec/plugins/libstrongswan-xcbc.so
15
libexec/ipsec/_copyright
114
libexec/ipsec/_copyright
16
libexec/ipsec/_updown
115
libexec/ipsec/_updown
17
libexec/ipsec/_updown_espmark
116
libexec/ipsec/_updown_espmark
18
libexec/ipsec/charon
117
libexec/ipsec/charon
19
libexec/ipsec/plugins/libstrongswan-aes.a
20
libexec/ipsec/plugins/libstrongswan-aes.la
21
libexec/ipsec/plugins/libstrongswan-aes.so
22
libexec/ipsec/plugins/libstrongswan-attr.a
23
libexec/ipsec/plugins/libstrongswan-attr.la
24
libexec/ipsec/plugins/libstrongswan-attr.so
25
libexec/ipsec/plugins/libstrongswan-des.a
26
libexec/ipsec/plugins/libstrongswan-des.la
27
libexec/ipsec/plugins/libstrongswan-des.so
28
libexec/ipsec/plugins/libstrongswan-constraints.a
29
libexec/ipsec/plugins/libstrongswan-constraints.la
30
libexec/ipsec/plugins/libstrongswan-constraints.so
31
libexec/ipsec/plugins/libstrongswan-dnskey.a
32
libexec/ipsec/plugins/libstrongswan-dnskey.la
33
libexec/ipsec/plugins/libstrongswan-dnskey.so
34
libexec/ipsec/plugins/libstrongswan-fips-prf.a
35
libexec/ipsec/plugins/libstrongswan-fips-prf.la
36
libexec/ipsec/plugins/libstrongswan-fips-prf.so
37
libexec/ipsec/plugins/libstrongswan-gmp.a
38
libexec/ipsec/plugins/libstrongswan-gmp.la
39
libexec/ipsec/plugins/libstrongswan-gmp.so
40
libexec/ipsec/plugins/libstrongswan-hmac.a
41
libexec/ipsec/plugins/libstrongswan-hmac.la
42
libexec/ipsec/plugins/libstrongswan-hmac.so
43
libexec/ipsec/plugins/libstrongswan-kernel-pfkey.a
44
libexec/ipsec/plugins/libstrongswan-kernel-pfkey.la
45
libexec/ipsec/plugins/libstrongswan-kernel-pfkey.so
46
libexec/ipsec/plugins/libstrongswan-kernel-pfroute.a
47
libexec/ipsec/plugins/libstrongswan-kernel-pfroute.la
48
libexec/ipsec/plugins/libstrongswan-kernel-pfroute.so
49
libexec/ipsec/plugins/libstrongswan-md5.a
50
libexec/ipsec/plugins/libstrongswan-md5.la
51
libexec/ipsec/plugins/libstrongswan-md5.so
52
libexec/ipsec/plugins/libstrongswan-pem.a
53
libexec/ipsec/plugins/libstrongswan-pem.la
54
libexec/ipsec/plugins/libstrongswan-pem.so
55
libexec/ipsec/plugins/libstrongswan-pgp.a
56
libexec/ipsec/plugins/libstrongswan-pgp.la
57
libexec/ipsec/plugins/libstrongswan-pgp.so
58
libexec/ipsec/plugins/libstrongswan-pkcs1.a
59
libexec/ipsec/plugins/libstrongswan-pkcs1.la
60
libexec/ipsec/plugins/libstrongswan-pkcs1.so
61
libexec/ipsec/plugins/libstrongswan-pubkey.a
62
libexec/ipsec/plugins/libstrongswan-pubkey.la
63
libexec/ipsec/plugins/libstrongswan-pubkey.so
64
libexec/ipsec/plugins/libstrongswan-random.a
65
libexec/ipsec/plugins/libstrongswan-random.la
66
libexec/ipsec/plugins/libstrongswan-random.so
67
libexec/ipsec/plugins/libstrongswan-resolve.a
68
libexec/ipsec/plugins/libstrongswan-resolve.la
69
libexec/ipsec/plugins/libstrongswan-resolve.so
70
libexec/ipsec/plugins/libstrongswan-sha1.a
71
libexec/ipsec/plugins/libstrongswan-sha1.la
72
libexec/ipsec/plugins/libstrongswan-sha1.so
73
libexec/ipsec/plugins/libstrongswan-sha2.a
74
libexec/ipsec/plugins/libstrongswan-sha2.la
75
libexec/ipsec/plugins/libstrongswan-sha2.so
76
libexec/ipsec/plugins/libstrongswan-revocation.a
77
libexec/ipsec/plugins/libstrongswan-revocation.la
78
libexec/ipsec/plugins/libstrongswan-revocation.so
79
libexec/ipsec/plugins/libstrongswan-socket-default.a
80
libexec/ipsec/plugins/libstrongswan-socket-default.la
81
libexec/ipsec/plugins/libstrongswan-socket-default.so
82
libexec/ipsec/plugins/libstrongswan-stroke.a
83
libexec/ipsec/plugins/libstrongswan-stroke.la
84
libexec/ipsec/plugins/libstrongswan-stroke.so
85
libexec/ipsec/plugins/libstrongswan-updown.a
86
libexec/ipsec/plugins/libstrongswan-updown.la
87
libexec/ipsec/plugins/libstrongswan-updown.so
88
libexec/ipsec/plugins/libstrongswan-x509.a
89
libexec/ipsec/plugins/libstrongswan-x509.la
90
libexec/ipsec/plugins/libstrongswan-x509.so
91
libexec/ipsec/plugins/libstrongswan-xcbc.a
92
libexec/ipsec/plugins/libstrongswan-xcbc.la
93
libexec/ipsec/plugins/libstrongswan-xcbc.so
94
libexec/ipsec/starter
118
libexec/ipsec/starter
95
libexec/ipsec/stroke
119
libexec/ipsec/stroke
120
libexec/ipsec/whitelist
96
sbin/ipsec
121
sbin/ipsec
97
@dirrm libexec/ipsec/plugins
122
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-eap-aka.a
123
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-eap-aka.la
124
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-eap-aka.so
125
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-eap-aka-3gpp2.a
126
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-eap-aka-3gpp2.la
127
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-eap-aka-3gpp2.so
128
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-gmp.a
129
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-gmp.la
130
%%EAPAKA3GPP2%%lib/ipsec/plugins/libstrongswan-gmp.so
131
%%EAPSIMFILE%%lib/ipsec/plugins/libstrongswan-eap-sim.a
132
%%EAPSIMFILE%%lib/ipsec/plugins/libstrongswan-eap-sim.la
133
%%EAPSIMFILE%%lib/ipsec/plugins/libstrongswan-eap-sim.so
134
%%EAPSIMFILE%%lib/ipsec/plugins/libstrongswan-eap-sim-file.a
135
%%EAPSIMFILE%%lib/ipsec/plugins/libstrongswan-eap-sim-file.la
136
%%EAPSIMFILE%%lib/ipsec/plugins/libstrongswan-eap-sim-file.so
137
%%CURL%%lib/ipsec/plugins/libstrongswan-curl.a
138
%%CURL%%lib/ipsec/plugins/libstrongswan-curl.la
139
%%CURL%%lib/ipsec/plugins/libstrongswan-curl.so
140
%%MYSQL%%lib/ipsec/plugins/libstrongswan-mysql.a
141
%%MYSQL%%lib/ipsec/plugins/libstrongswan-mysql.la
142
%%MYSQL%%lib/ipsec/plugins/libstrongswan-mysql.so
143
%%SQL%%lib/ipsec/plugins/libstrongswan-attr-sql.a
144
%%SQL%%lib/ipsec/plugins/libstrongswan-attr-sql.la
145
%%SQL%%lib/ipsec/plugins/libstrongswan-attr-sql.so
146
%%SQL%%lib/ipsec/plugins/libstrongswan-sql.a
147
%%SQL%%lib/ipsec/plugins/libstrongswan-sql.la
148
%%SQL%%lib/ipsec/plugins/libstrongswan-sql.so
149
%%SQL%%libexec/ipsec/pool
150
%%SQLITE%%lib/ipsec/plugins/libstrongswan-sqlite.a
151
%%SQLITE%%lib/ipsec/plugins/libstrongswan-sqlite.la
152
%%SQLITE%%lib/ipsec/plugins/libstrongswan-sqlite.so
98
@dirrm libexec/ipsec
153
@dirrm libexec/ipsec
154
@dirrm lib/ipsec/plugins
155
@dirrm lib/ipsec
99
@dirrm etc/ipsec.d/reqs
156
@dirrm etc/ipsec.d/reqs
100
@dirrm etc/ipsec.d/private
157
@dirrm etc/ipsec.d/private
101
@dirrm etc/ipsec.d/ocspcerts
158
@dirrm etc/ipsec.d/ocspcerts
Lines 105-115 Link Here
105
@dirrm etc/ipsec.d/acerts
162
@dirrm etc/ipsec.d/acerts
106
@dirrm etc/ipsec.d/aacerts
163
@dirrm etc/ipsec.d/aacerts
107
@dirrm etc/ipsec.d
164
@dirrm etc/ipsec.d
108
@exec mkdir -p %D/etc/ipsec.d/reqs
109
@exec mkdir -p %D/etc/ipsec.d/private
110
@exec mkdir -p %D/etc/ipsec.d/ocspcerts
111
@exec mkdir -p %D/etc/ipsec.d/crls
112
@exec mkdir -p %D/etc/ipsec.d/certs
113
@exec mkdir -p %D/etc/ipsec.d/cacerts
114
@exec mkdir -p %D/etc/ipsec.d/acerts
115
@exec mkdir -p %D/etc/ipsec.d/aacerts
(-)files/patch-src__ipsec__ipsec.in (+29 lines)
Added Link Here
1
*** src/ipsec/ipsec.in	2010-12-10 12:55:02.000000000 +0200
2
--- src/ipsec/ipsec.in.new	2011-08-18 22:43:11.846156312 +0200
3
***************
4
*** 19,24 ****
5
--- 19,25 ----
6
  export PATH
7
  
8
  # name and version of the ipsec implementation
9
+ OS_NAME=`uname -s`
10
  IPSEC_NAME="@IPSEC_NAME@"
11
  IPSEC_VERSION="U@IPSEC_VERSION@/K`uname -r`"
12
  
13
***************
14
*** 378,384 ****
15
  	fi
16
  	;;
17
  version|--version)
18
! 	printf "Linux $IPSEC_NAME $IPSEC_VERSION\n"
19
  	printf "$IPSEC_DISTRO\n"
20
  	printf "See 'ipsec --copyright' for copyright information.\n"
21
  	exit 0
22
--- 379,385 ----
23
  	fi
24
  	;;
25
  version|--version)
26
! 	printf "$OS_NAME $IPSEC_NAME $IPSEC_VERSION\n"
27
  	printf "$IPSEC_DISTRO\n"
28
  	printf "See 'ipsec --copyright' for copyright information.\n"
29
  	exit 0
(-)files/patch-src__libcharon__bus__listeners__sys_logger.c (-19 lines)
Removed Link Here
1
--- srcold/libcharon/bus/listeners/sys_logger.c	2011-03-10 20:50:01.000000000 +0200
2
+++ src/libcharon/bus/listeners/sys_logger.c	2011-03-10 20:53:59.000000000 +0200
3
@@ -79,13 +79,15 @@
4
 		/* do a syslog with every line */
5
 		while (current)
6
 		{
7
+			char tmp[8192];
8
 			next = strchr(current, '\n');
9
 			if (next)
10
 			{
11
 				*(next++) = '\0';
12
 			}
13
-			syslog(this->facility|LOG_INFO, "%.2d[%N]%s %s\n",
14
+			snprintf(tmp, 8192, "%.2d[%N]%s %s\n",
15
 				   thread, debug_names, group, namestr, current);
16
+			syslog(this->facility|LOG_INFO, tmp);
17
 			current = next;
18
 		}
19
 	}
(-)files/patch-src__libcharon__plugins__kernel_pfkey__kernel_pfkey_ipsec.c (-102 lines)
Removed Link Here
1
diff -u -r srcold/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
2
--- srcold/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c	2010-03-19 17:56:54.000000000 +0200
3
+++ src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c	2010-05-28 15:58:12.000000000 +0200
4
@@ -600,17 +600,43 @@
5
 }
6
 
7
 /**
8
- * add a host behind a sadb_address extension
9
+ * Copy a host_t as sockaddr_t to the given memory location. Ports are
10
+ * reset to zero as per RFC 2367.
11
+ * @returns		the number of bytes copied
12
  */
13
-static void host2ext(host_t *host, struct sadb_address *ext)
14
+static size_t hostcpy(void *dest, host_t *host)
15
 {
16
-	sockaddr_t *host_addr = host->get_sockaddr(host);
17
+	sockaddr_t *addr = host->get_sockaddr(host), *dest_addr = dest;
18
 	socklen_t *len = host->get_sockaddr_len(host);
19
+	memcpy(dest, addr, *len);
20
 #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
21
-	host_addr->sa_len = *len;
22
+	dest_addr->sa_len = *len;
23
 #endif
24
-	memcpy((char*)(ext + 1), host_addr, *len);
25
-	ext->sadb_address_len = PFKEY_LEN(sizeof(*ext) + *len);
26
+	switch (dest_addr->sa_family)
27
+	{
28
+		case AF_INET:
29
+		{
30
+			struct sockaddr_in *sin = dest;
31
+			sin->sin_port = 0;
32
+			break;
33
+		}
34
+		case AF_INET6:
35
+		{
36
+			struct sockaddr_in6 *sin6 = dest;
37
+			sin6->sin6_port = 0;
38
+			break;
39
+		}
40
+	}
41
+	return *len;
42
+}
43
+
44
+/**
45
+ * add a host behind an sadb_address extension
46
+ */
47
+static void host2ext(host_t *host, struct sadb_address *ext)
48
+{
49
+	size_t len = hostcpy(ext + 1, host);
50
+	ext->sadb_address_len = PFKEY_LEN(sizeof(*ext) + len);
51
 }
52
 
53
 /**
54
@@ -1019,6 +1045,7 @@
55
 }
56
 #endif /*SADB_X_MIGRATE*/
57
 
58
+#ifndef __FreeBSD__
59
 #ifdef HAVE_NATT
60
 /**
61
  * Process a SADB_X_NAT_T_NEW_MAPPING message from the kernel
62
@@ -1076,6 +1103,7 @@
63
 	}
64
 }
65
 #endif /*HAVE_NATT*/
66
+#endif /*__FreeBSD__*/
67
 
68
 /**
69
  * Receives events from kernel
70
@@ -1137,11 +1165,13 @@
71
 			process_migrate(this, msg);
72
 			break;
73
 #endif /*SADB_X_MIGRATE*/
74
+#ifndef __FreeBSD__
75
 #ifdef HAVE_NATT
76
 		case SADB_X_NAT_T_NEW_MAPPING:
77
 			process_mapping(this, msg);
78
 			break;
79
 #endif /*HAVE_NATT*/
80
+#endif /*__FreeBSD__*/
81
 		default:
82
 			break;
83
 	}
84
@@ -1679,14 +1709,10 @@
85
 	req->sadb_x_ipsecrequest_level = IPSEC_LEVEL_UNIQUE;
86
 	if (mode == MODE_TUNNEL)
87
 	{
88
-		sockaddr_t *sa;
89
-		socklen_t sl;
90
-		sa = src->get_sockaddr(src);
91
-		sl = *src->get_sockaddr_len(src);
92
-		memcpy(req + 1, sa, sl);
93
-		sa = dst->get_sockaddr(dst);
94
-		memcpy((u_int8_t*)(req + 1) + sl, sa, sl);
95
-		req->sadb_x_ipsecrequest_len += sl * 2;
96
+		len = hostcpy(req + 1, src);
97
+		req->sadb_x_ipsecrequest_len += len;
98
+		len = hostcpy((char*)(req + 1) + len, dst);
99
+		req->sadb_x_ipsecrequest_len += len;
100
 	}
101
 
102
 	pol->sadb_x_policy_len += PFKEY_LEN(req->sadb_x_ipsecrequest_len);
(-)files/strongswan.sh.in (+33 lines)
Added Link Here
1
#!/bin/sh
2
# Start or stop strongswan
3
# $FreeBSD: $
4
5
# PROVIDE: strongswan
6
# REQUIRE: DAEMON
7
# BEFORE: LOGIN
8
# KEYWORD: shutdown
9
10
command="%%PREFIX%%/sbin/ipsec"
11
. /etc/rc.subr
12
13
name="strongswan"
14
rcvar=`set_rcvar`
15
extra_commands="reload statusall"
16
17
load_rc_config $name
18
19
start_cmd="strongswan_command start"
20
stop_cmd="strongswan_command stop"
21
restart_cmd="strongswan_command restart"
22
status_cmd="strongswan_command status"
23
reload_cmd="strongswan_command reload"
24
statusall_cmd="strongswan_command statusall"
25
26
27
strongswan_command()
28
{
29
	$command ${rc_arg}
30
}
31
32
run_rc_command "$1"
33

Return to bug 160401