Skip to content

Commit

Permalink
Fix for agent crash in IGMP for VHOST0 interface.
Browse files Browse the repository at this point in the history
Putting check for ignoring vhost and when vm's vrf differs
from native vrf.

Change-Id: If8b22969e94f027676fd20d6f7006428e803d75c
Partial-Bug: #1771170
  • Loading branch information
esnagendra committed Jun 20, 2018
1 parent e485c0d commit dd2daeb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/vnsw/agent/services/igmp_proto.cc
Expand Up @@ -288,6 +288,12 @@ bool IgmpProto::SendIgmpPacket(GmpIntf *gmp_intf, GmpPacket *packet) {
if (!vm_itf) {
continue;
}
if (vm_itf->vmi_type() == VmInterface::VHOST) {
continue;
}
if (vrf->GetName() != vm_itf->vrf()->GetName()) {
continue;
}
if (!ipam->IsSubnetMember(IpAddress(vm_itf->primary_ip_addr()))) {
break;
}
Expand All @@ -305,13 +311,11 @@ bool IgmpProto::SendIgmpPacket(GmpIntf *gmp_intf, GmpPacket *packet) {

void IgmpProto::IncrSendStats(const VmInterface *vm_itf, bool tx_done) {

IgmpProto *igmp_proto = agent()->GetIgmpProto();

const VnEntry *vn = vm_itf->vn();
IgmpInfo::VnIgmpDBState *state = NULL;
state = static_cast<IgmpInfo::VnIgmpDBState *>(vn->GetState(
vn->get_table_partition()->parent(),
igmp_proto->vn_listener_id()));
vn_listener_id()));
const VnIpam *ipam = vn->GetIpam(vm_itf->primary_ip_addr());
IgmpInfo::VnIgmpDBState::IgmpSubnetStateMap::const_iterator it =
state->igmp_state_map_.find(ipam->default_gw);
Expand Down

0 comments on commit dd2daeb

Please sign in to comment.