From 363fa060f8b1752b0a3007b12eb81da35be24ee6 Mon Sep 17 00:00:00 2001 From: kellyyeh <42761586+kellyyeh@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:05:27 -0800 Subject: [PATCH] Skip vlans with no dhcpv6 server configured (#46) --- src/config_interface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config_interface.cpp b/src/config_interface.cpp index 08191e4..e6b07fa 100644 --- a/src/config_interface.cpp +++ b/src/config_interface.cpp @@ -145,6 +145,10 @@ void processRelayNotification(std::deque &entries, intf.is_interface_id = true; } } + if (intf.servers.empty()) { + syslog(LOG_WARNING, "No servers found for VLAN %s, skipping configuration.", vlan.c_str()); + continue; + } syslog(LOG_INFO, "add %s relay config, option79 %s interface-id %s\n", vlan.c_str(), intf.is_option_79 ? "enable" : "disable", intf.is_interface_id ? "enable" : "disable"); vlans[vlan] = intf;