From f7151e8ddba235848e6707e020fdf8a680fbad77 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 24 Apr 2018 15:13:51 -0700 Subject: [PATCH] [radvd] Ensure at least one interface is specified in radvd.conf before starting radvd (#1636) --- dockers/docker-router-advertiser/start.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dockers/docker-router-advertiser/start.sh b/dockers/docker-router-advertiser/start.sh index 7fcaf65a79..159006a176 100755 --- a/dockers/docker-router-advertiser/start.sh +++ b/dockers/docker-router-advertiser/start.sh @@ -14,5 +14,12 @@ fi # Generate /etc/radvd.conf config file sonic-cfggen -d -t /usr/share/sonic/templates/radvd.conf.j2 > /etc/radvd.conf +# Enusre at least one interface is specified in radvd.conf +NUM_IFACES=$(grep -c "^interface " /etc/radvd.conf) +if [ $NUM_IFACES -eq 0 ]; then + echo "No interfaces specified in radvd.conf. Not starting router advertiser process." + exit 0 +fi + # Start the router advertiser supervisorctl start radvd