Skip to content

Commit

Permalink
test-incus-network-bridge-firewall: Fix interface name
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Oct 27, 2023
1 parent 01fc16c commit 6e53020
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions bin/test-incus-network-bridge-firewall
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ebtables --version 2>&1 | grep legacy

# Setup bridge filter and unmanaged bridge.s
modprobe br_netfilter
ip link add incusbr0unmanaged type bridge
ip link add incbr0unmanaged type bridge

firewallTests() {
incus launch images:ubuntu/focal c1
Expand Down Expand Up @@ -139,16 +139,16 @@ firewallTests
echo "=> Performing nftables unmanaged bridge tests"
ip a flush dev incusbr0 # Clear duplicate address from incusbr0.
ip link set incusbr0 down
ip a add 192.0.2.1/24 dev incusbr0unmanaged
ip a add 2001:db8::1/64 dev incusbr0unmanaged
ip link set incusbr0unmanaged up
ip a add 192.0.2.1/24 dev incbr0unmanaged
ip a add 2001:db8::1/64 dev incbr0unmanaged
ip link set incbr0unmanaged up
incus profile device remove default eth0
incus profile device add default eth0 nic \
nictype=bridged \
parent=incusbr0unmanaged
parent=incbr0unmanaged
firewallTests
incus profile device remove default eth0
ip a flush dev incusbr0unmanaged
ip a flush dev incbr0unmanaged

echo "=> Performing xtables managed bridge tests"
incus profile device add default eth0 nic network=incusbr0
Expand All @@ -164,16 +164,16 @@ firewallTests
echo "=> Performing xtables unmanaged bridge tests"
ip a flush dev incusbr0 # Clear duplicate address from incusbr0.
ip link set incusbr0 down
ip a add 192.0.2.1/24 dev incusbr0unmanaged
ip a add 2001:db8::1/64 dev incusbr0unmanaged
ip link set incusbr0unmanaged up
ip a add 192.0.2.1/24 dev incbr0unmanaged
ip a add 2001:db8::1/64 dev incbr0unmanaged
ip link set incbr0unmanaged up
incus profile device remove default eth0
incus profile device add default eth0 nic \
nictype=bridged \
parent=incusbr0unmanaged
parent=incbr0unmanaged
firewallTests
incus profile device remove default eth0
ip link delete incusbr0unmanaged
ip link delete incbr0unmanaged

# Cleanup.
incus profile device remove default root
Expand Down

0 comments on commit 6e53020

Please sign in to comment.