3 CRYPTO_DEV=${CRYPTO_DEV:-'--vdev="crypto_aesni_gcm0"'}
5 #generate cfg file for ipsec-secgw
8 cat <<EOF > ${SGW_CFG_FILE}
10 sp ipv4 in esp protect 7 pri 2 src ${REMOTE_IPV4}/32 dst ${LOCAL_IPV4}/32 \
11 sport 0:65535 dport 0:65535
12 sp ipv4 in esp bypass pri 1 sport 0:65535 dport 0:65535
15 sp ipv4 out esp protect 7 pri 2 src ${LOCAL_IPV4}/32 dst ${REMOTE_IPV4}/32 \
16 sport 0:65535 dport 0:65535
17 sp ipv4 out esp bypass pri 1 sport 0:65535 dport 0:65535
20 sp ipv6 in esp protect 9 pri 2 src ${REMOTE_IPV6}/128 dst ${LOCAL_IPV6}/128 \
21 sport 0:65535 dport 0:65535
22 sp ipv6 in esp bypass pri 1 sport 0:65535 dport 0:65535
25 sp ipv6 out esp protect 9 pri 2 src ${LOCAL_IPV6}/128 dst ${REMOTE_IPV6}/128 \
26 sport 0:65535 dport 0:65535
27 sp ipv6 out esp bypass pri 1 sport 0:65535 dport 0:65535
30 sa in 7 aead_algo aes-128-gcm \
31 aead_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
32 mode transport ${SGW_CFG_XPRM}
34 sa in 9 aead_algo aes-128-gcm \
35 aead_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
36 mode transport ${SGW_CFG_XPRM}
39 sa out 7 aead_algo aes-128-gcm \
40 aead_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
41 mode transport ${SGW_CFG_XPRM}
43 sa out 9 aead_algo aes-128-gcm \
44 aead_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
45 mode transport ${SGW_CFG_XPRM}
48 rt ipv4 dst ${REMOTE_IPV4}/32 port 0
49 rt ipv4 dst ${LOCAL_IPV4}/32 port 1
51 rt ipv6 dst ${REMOTE_IPV6}/128 port 0
52 rt ipv6 dst ${LOCAL_IPV6}/128 port 1
55 neigh port 0 ${REMOTE_MAC}
56 neigh port 1 ${LOCAL_MAC}