diff --git a/src/vnsw/agent/oper/test/test_aap.cc b/src/vnsw/agent/oper/test/test_aap.cc index 51e7287a342..4a42791ca62 100644 --- a/src/vnsw/agent/oper/test/test_aap.cc +++ b/src/vnsw/agent/oper/test/test_aap.cc @@ -172,6 +172,8 @@ TEST_F(TestAap, AddDel_1) { AddAap("intf1", 1, v); EXPECT_TRUE(RouteFind("vrf1", ip, 32)); + EXPECT_TRUE(RouteGet("vrf1", ip, 32)->GetActiveNextHop()->GetType() == + NextHop::INTERFACE); v.clear(); AddAap("intf1", 1, v); EXPECT_FALSE(RouteFind("vrf1", ip, 32)); diff --git a/src/vnsw/agent/oper/vm_interface.cc b/src/vnsw/agent/oper/vm_interface.cc index 5cfde8a7eb8..a06cca1467e 100644 --- a/src/vnsw/agent/oper/vm_interface.cc +++ b/src/vnsw/agent/oper/vm_interface.cc @@ -5017,7 +5017,8 @@ VmInterface::GetIpMac(const IpAddress &ip, uint8_t plen) const { AllowedAddressPairSet::const_iterator it = allowed_address_pair_list_.list_.begin(); while (it != allowed_address_pair_list_.list_.end()) { - if (it->addr_ == ip && it->plen_ == plen) { + if (it->addr_ == ip && it->plen_ == plen && + it->mac_ != MacAddress::kZeroMac) { return it->mac_; } it++;