Only add to DHCP_RELAY if dhcpv6 servers exist (#17770)

This commit is contained in:
kellyyeh 2024-01-30 10:02:34 -08:00 committed by mssonicbld
parent 5cd18eeda7
commit a110e625a2

View File

@ -680,8 +680,8 @@ def parse_dpg(dpg, hname):
vdhcpserver_list = vintfdhcpservers.split(';') vdhcpserver_list = vintfdhcpservers.split(';')
vlan_attributes['dhcpv6_servers'] = vdhcpserver_list vlan_attributes['dhcpv6_servers'] = vdhcpserver_list
dhcp_attributes['dhcpv6_servers'] = vdhcpserver_list dhcp_attributes['dhcpv6_servers'] = vdhcpserver_list
sonic_vlan_member_name = "Vlan%s" % (vlanid) sonic_vlan_member_name = "Vlan%s" % (vlanid)
dhcp_relay_table[sonic_vlan_member_name] = dhcp_attributes dhcp_relay_table[sonic_vlan_member_name] = dhcp_attributes
vlanmac = vintf.find(str(QName(ns, "MacAddress"))) vlanmac = vintf.find(str(QName(ns, "MacAddress")))
if vlanmac is not None and vlanmac.text is not None: if vlanmac is not None and vlanmac.text is not None: