Files
Tobias Brunner 1454bd7bcf testing: Make per-CPU SAs scenarios more predictable by pinning IRQs to vCPUs
This ensures that packets on sun are processed on a particular CPU and
not randomly on one, which causes expected SAs not to get created or
other weird things.
2025-12-03 11:42:54 +01:00

17 lines
793 B
Plaintext
Executable File

# make sure inbound packets trigger IRQ on the right CPU
sun::set-cpu-affinity eth0 0
sun::iptables-restore < /etc/iptables.rules
moon::iptables-restore < /etc/iptables.rules
sun::systemctl start strongswan
moon::systemctl start strongswan
sun::expect-connection gw-gw
moon::expect-connection gw-gw
# allow UDP encap from any source to 4500
moon::iptables -A INPUT -i eth0 -p udp --dport 4500 -j ACCEPT
moon::iptables -A OUTPUT -o eth0 -p udp --dport 4500 -j ACCEPT
sun:: iptables -A INPUT -i eth0 -p udp --dport 4500 -j ACCEPT
sun:: iptables -A OUTPUT -o eth0 -p udp --dport 4500 -j ACCEPT
# trigger the creation of the fallback SA, use -I so no UDP socket is used to
# determine the source address and trigger the acqurie (this packet is lost)
moon::ping -c 1 -W 1 -I PH_IP_MOON PH_IP_SUN