Skip to content

Commit

Permalink
Merge "* Dont fetch mac address if interface is NULL Closes-bug:#1599…
Browse files Browse the repository at this point in the history
…247"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jul 8, 2016
2 parents d7cf754 + 18e1ada commit 1691c67
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/vnsw/agent/oper/agent_path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,14 @@ bool LocalVmRoute::AddChangePath(Agent *agent, AgentPath *path,
policy = true;
}

MacAddress mac = vm_port->vm_mac();
const InetUnicastRouteEntry *ip_rt =
dynamic_cast<const InetUnicastRouteEntry *>(rt);
if (ip_rt) {
mac = vm_port->GetIpMac(ip_rt->addr(), ip_rt->plen());
MacAddress mac = MacAddress::ZeroMac();
if (vm_port) {
mac = vm_port->vm_mac();
const InetUnicastRouteEntry *ip_rt =
dynamic_cast<const InetUnicastRouteEntry *>(rt);
if (ip_rt) {
mac = vm_port->GetIpMac(ip_rt->addr(), ip_rt->plen());
}
}

InterfaceNHKey key(intf_.Clone(), policy, flags_, mac);
Expand Down

0 comments on commit 1691c67

Please sign in to comment.