Skip to content

Commit

Permalink
Skip vlans with no dhcpv6 server configured (sonic-net#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyyeh authored Feb 5, 2024
1 parent 5ae186f commit 363fa06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ void processRelayNotification(std::deque<swss::KeyOpFieldsValuesTuple> &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;
Expand Down

0 comments on commit 363fa06

Please sign in to comment.