Skip to content

Commit

Permalink
Merge "* Copy interface mac in AAP route if no mac is specified."
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jul 26, 2016
2 parents b3b7bdf + c40da29 commit 163eb6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/vnsw/agent/oper/test/test_aap.cc
Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion src/vnsw/agent/oper/vm_interface.cc
Expand Up @@ -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++;
Expand Down

0 comments on commit 163eb6e

Please sign in to comment.