Preliminary fix for packet capture loss

Interface offloading was not being turned off during setup
This commit is contained in:
William Wernert
2019-08-14 12:09:03 -04:00
parent f1ae2617c2
commit 8dbb5de55d
2 changed files with 17 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
#!/bin/bash
if [ "$NM_DISPATCHER_ACTION" == "pre-up" ]; then
if ["$DEVICE_IFACE" !== "$MAININT"]; then
for i in rx tx sg tso ufo gso gro lro; do
ethtool -K $DEVICE_IFACE $i off;
done
fii
fi

View File

@@ -246,15 +246,15 @@ copy_ssh_key() {
}
create_bond_nmcli() {
network_setup() {
echo "Setting up Bond" >> $SETUPLOG 2>&1
# Set the MTU
if [ $NSMSETUP != 'ADVANCED' ]; then
if [ "$NSMSETUP" != 'ADVANCED' ]; then
MTU=1500
fi
# Create the bond interface
# Create the bond interface
nmcli con add ifname bond0 con-name "bond0" type bond mode 0 -- \
ipv4.method disabled \
ipv6.method link-local \
@@ -271,6 +271,11 @@ create_bond_nmcli() {
# Bring the slave interface up
nmcli con up bond0-slave-$BONDNIC >> $SETUPLOG 2>&1
done
sed -i "s/\$MAININT/${MAININT}/g" ./install_scripts/disable-checksum-offload.sh >> $SETUPLOG 2>&1
# Copy the checksum offload script to prevent issues with packet capture
cp ./install_scripts/disable-checksum-offload.sh /etc/NetworkManager/dispatcher.d/disable-checksum-offload.sh >> $SETUPLOG 2>&1
}
detect_os() {