Skip to content

Commit 00f9d2b

Browse files
committed
Clean up build flags
- Clean up build flags for Libreswan. In Libreswan 4.1, these flags are now set automatically based on Ubuntu/Debian versions, and no longer needed for CentOS/RHEL 7 and 8. - Ref: https://github.com/libreswan/libreswan/blob/main/mk/defaults/linux.mk libreswan/libreswan@c01ffcc1
1 parent 41142ee commit 00f9d2b

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

extras/vpnupgrade.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,19 @@ fi
169169
cat > Makefile.inc.local <<'EOF'
170170
WERROR_CFLAGS=-w
171171
USE_DNSSEC=false
172+
EOF
173+
if [ "$SWAN_VER" != "4.1" ]; then
174+
cat >> Makefile.inc.local <<'EOF'
172175
USE_DH31=false
173176
USE_NSS_AVA_COPY=true
174177
USE_NSS_IPSEC_PROFILE=false
175178
USE_GLIBC_KERN_FLIP_HEADERS=true
176179
EOF
180+
fi
177181
if [ "$SWAN_VER" = "3.31" ] || [ "$SWAN_VER" = "3.32" ] || [ "$SWAN_VER" = "4.1" ]; then
178182
echo "USE_DH2=true" >> Makefile.inc.local
183+
fi
184+
if [ "$SWAN_VER" = "3.31" ] || [ "$SWAN_VER" = "3.32" ]; then
179185
if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then
180186
echo "USE_XFRM_INTERFACE_IFLA_HEADER=true" >> Makefile.inc.local
181187
fi

extras/vpnupgrade_centos.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,15 @@ fi
177177
cat > Makefile.inc.local <<'EOF'
178178
WERROR_CFLAGS=-w
179179
USE_DNSSEC=false
180+
EOF
181+
if [ "$SWAN_VER" != "4.1" ]; then
182+
cat >> Makefile.inc.local <<'EOF'
180183
USE_DH31=false
181184
USE_NSS_AVA_COPY=true
182185
USE_NSS_IPSEC_PROFILE=false
183186
USE_GLIBC_KERN_FLIP_HEADERS=true
184187
EOF
188+
fi
185189
if [ "$SWAN_VER" = "3.31" ] || [ "$SWAN_VER" = "3.32" ] || [ "$SWAN_VER" = "4.1" ]; then
186190
echo "USE_DH2=true" >> Makefile.inc.local
187191
if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then

vpnsetup.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,9 @@ cat > Makefile.inc.local <<'EOF'
197197
WERROR_CFLAGS=-w
198198
USE_DNSSEC=false
199199
USE_DH2=true
200-
USE_DH31=false
201-
USE_NSS_AVA_COPY=true
202-
USE_NSS_IPSEC_PROFILE=false
203-
USE_GLIBC_KERN_FLIP_HEADERS=true
204200
USE_NSS_KDF=false
205201
FINALNSSDIR=/etc/ipsec.d
206202
EOF
207-
if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then
208-
echo "USE_XFRM_INTERFACE_IFLA_HEADER=true" >> Makefile.inc.local
209-
fi
210203
if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then
211204
apt-get -yq install libsystemd-dev || exiterr2
212205
fi

vpnsetup_centos.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,6 @@ cat > Makefile.inc.local <<'EOF'
194194
WERROR_CFLAGS=-w
195195
USE_DNSSEC=false
196196
USE_DH2=true
197-
USE_DH31=false
198-
USE_NSS_AVA_COPY=true
199-
USE_NSS_IPSEC_PROFILE=false
200-
USE_GLIBC_KERN_FLIP_HEADERS=true
201197
USE_NSS_KDF=false
202198
FINALNSSDIR=/etc/ipsec.d
203199
EOF

0 commit comments

Comments
 (0)