Skip to content

Commit

Permalink
Merge "Do not create state on deleted entry." into R3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 29, 2016
2 parents 2ef1648 + cbfad46 commit b922a60
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/vnsw/agent/services/icmpv6_proto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,21 @@ void Icmpv6Proto::VrfNotify(DBTablePartBase *part, DBEntryBase *entry) {
Icmpv6VrfState *state = static_cast<Icmpv6VrfState *>(vrf->GetState(
vrf->get_table_partition()->parent(),
vrf_table_listener_id_));
if (state && entry->IsDeleted()) {
boost::system::error_code ec;
Ip6Address addr = Ip6Address::from_string(IPV6_ALL_ROUTERS_ADDRESS, ec);
// enqueue delete request on fabric VRF
agent_->fabric_inet4_unicast_table()->DeleteReq(agent_->local_peer(),
vrf->GetName(),
addr, 128, NULL);
addr = Ip6Address::from_string(PKT0_LINKLOCAL_ADDRESS, ec);
agent_->fabric_inet4_unicast_table()->DeleteReq(agent_->local_peer(),
vrf->GetName(),
addr, 128, NULL);
state->set_default_routes_added(false);
state->Delete();
if (entry->IsDeleted()) {
if (state) {
boost::system::error_code ec;
Ip6Address addr =
Ip6Address::from_string(IPV6_ALL_ROUTERS_ADDRESS, ec);
// enqueue delete request on fabric VRF
agent_->fabric_inet4_unicast_table()->DeleteReq(
agent_->local_peer(), vrf->GetName(), addr, 128, NULL);
addr = Ip6Address::from_string(PKT0_LINKLOCAL_ADDRESS, ec);
agent_->fabric_inet4_unicast_table()->DeleteReq(
agent_->local_peer(), vrf->GetName(), addr, 128, NULL);
state->set_default_routes_added(false);
state->Delete();
}
return;
}
if (!state) {
CreateAndSetVrfState(vrf);
Expand Down

0 comments on commit b922a60

Please sign in to comment.