Skip to content

Commit 47c586f

Browse files
authored
[vpp]: Add sr0 interface for VPP. (sonic-net#24359)
SONiC VPP has support for SRv6, but the sr0 interface is needed for it to work; added here in 202411: Azure/sonic-buildimage-msft#517. A commit to master has comments requesting it to be enabled per platform: sonic-net#24084. Adding this change so that for VPP it is enabled and can allow sonic-mgmt tests for srv6 to be run with Sonic-VPP.
1 parent 1f30a74 commit 47c586f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

dockers/docker-fpm-frr/docker_init.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,18 @@ fi
9999

100100
chown -R frr:frr /etc/frr/
101101

102+
# Create sr0 interface for SRv6 support
103+
SONIC_ASIC_TYPE=$(sed -n 's/^asic_type:[[:space:]]*//p' /etc/sonic/sonic_version.yml)
104+
if [ "$SONIC_ASIC_TYPE" == "vpp" ]; then
105+
if ! ip link show sr0 > /dev/null 2>&1; then
106+
echo "Interface sr0 does not exist. Creating sr0..."
107+
ip link add sr0 type dummy || true
108+
else
109+
echo "Interface sr0 already exists."
110+
fi
111+
ip link set sr0 up || true
112+
fi
113+
102114
chown root:root /usr/sbin/bgp-isolate
103115
chmod 0755 /usr/sbin/bgp-isolate
104116

0 commit comments

Comments
 (0)