add fake promisc setup scripts for tera mac-flipping.
This commit is contained in:
2
roles/sapp/files/tera_fake_promisc_setup.conf
Normal file
2
roles/sapp/files/tera_fake_promisc_setup.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
[Service]
|
||||
ExecStartPre=/bin/bash tera_fake_promisc_setup.sh
|
||||
4
roles/sapp/files/tera_fake_promisc_setup.sh
Executable file
4
roles/sapp/files/tera_fake_promisc_setup.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
set -ex
|
||||
dp_adapter_ether_addr=$(ifconfig ens1f2 | grep ether | awk '{print $2}')
|
||||
bpf_rule="ether dst $dp_adapter_ether_addr or ether dst 02:42:c0:a8:fd:03 or ether dst 02:42:c0:a8:fd:83 or ether dst 02:42:c0:a8:fd:82"
|
||||
sed -i "/BSD_packet_filter=/s/=.*/=\"$bpf_rule\"/" etc/sapp.toml
|
||||
Reference in New Issue
Block a user