Skip to content

Commit b6db9dd

Browse files
authored
[intfsorch] Create subport with the entry contains necessary attributes (sonic-net#1650)
Subport mtu and admin_status initialized to values of 0 and false resepectively.
1 parent c2cbeb5 commit b6db9dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

orchagent/intfsorch.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ void IntfsOrch::doTask(Consumer &consumer)
588588
string vrf_name = "", vnet_name = "", nat_zone = "";
589589
MacAddress mac;
590590

591-
uint32_t mtu;
592-
bool adminUp;
591+
uint32_t mtu = 0;
592+
bool adminUp = false;
593593
uint32_t nat_zone_id = 0;
594594
string proxy_arp = "";
595595
string inband_type = "";
@@ -742,7 +742,7 @@ void IntfsOrch::doTask(Consumer &consumer)
742742
Port port;
743743
if (!gPortsOrch->getPort(alias, port))
744744
{
745-
if (isSubIntf)
745+
if (!ip_prefix_in_key && isSubIntf)
746746
{
747747
if (!gPortsOrch->addSubPort(port, alias, adminUp, mtu))
748748
{

0 commit comments

Comments
 (0)