Skip to content

Commit

Permalink
Merge "* Dont send evpn route with NULL IPV6 address"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jul 16, 2015
2 parents 2185ac1 + e376fe6 commit ac9af4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/vnsw/agent/oper/test/test_intf.cc
Expand Up @@ -2862,7 +2862,7 @@ TEST_F(IntfTest, Layer2Mode_3) {
EXPECT_TRUE(L2RouteFind("vrf1", mac));
EvpnRouteEntry *evpn_rt = EvpnRouteGet("vrf1", mac, zero_ip,
vm_intf->ethernet_tag());
EXPECT_TRUE(evpn_rt != NULL);
EXPECT_TRUE(evpn_rt == NULL);
evpn_rt = EvpnRouteGet("vrf1", mac, addr, vm_intf->ethernet_tag());
EXPECT_TRUE(evpn_rt != NULL);

Expand All @@ -2876,8 +2876,7 @@ TEST_F(IntfTest, Layer2Mode_3) {

evpn_rt = EvpnRouteGet("vrf1", mac, zero_ip,
vm_intf->ethernet_tag());
EXPECT_TRUE(evpn_rt != NULL);
EXPECT_TRUE(evpn_rt->GetActiveNextHop()->PolicyEnabled() == false);
EXPECT_TRUE(evpn_rt == NULL);
evpn_rt = EvpnRouteGet("vrf1", mac, addr, vm_intf->ethernet_tag());
EXPECT_TRUE(evpn_rt == NULL);
EXPECT_FALSE(RouteFindV6("vrf1", addr, 128));
Expand All @@ -2890,7 +2889,7 @@ TEST_F(IntfTest, Layer2Mode_3) {

evpn_rt = EvpnRouteGet("vrf1", mac, zero_ip,
vm_intf->ethernet_tag());
EXPECT_TRUE(evpn_rt != NULL);
EXPECT_TRUE(evpn_rt == NULL);
evpn_rt = EvpnRouteGet("vrf1", mac, addr, vm_intf->ethernet_tag());
EXPECT_TRUE(evpn_rt != NULL);
EXPECT_TRUE(RouteFindV6("vrf1", addr, 128));
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/oper/vm_interface.cc
Expand Up @@ -2901,7 +2901,7 @@ void VmInterface::UpdateL2InterfaceRoute(bool old_l2_active, bool force_update,
path_preference, ethernet_tag_);
}

if (new_ip6_addr.is_unspecified() || layer3_forwarding_ == true) {
if (new_ip6_addr.is_unspecified() == false && layer3_forwarding_ == true) {
table->AddLocalVmRoute(peer_.get(), vrf_->GetName(),
mac, this, new_ip6_addr,
l2_label_, vn_->GetName(), sg_id_list,
Expand Down

0 comments on commit ac9af4d

Please sign in to comment.