Skip to content

Commit

Permalink
Fix uninitialized vrouter params
Browse files Browse the repository at this point in the history
Issue:
------
uninitialized variable results in bad calculation of number
of MPLS labels for multicast

Fix:
----
initialize vrouter params to 0, handle case if
vrouter_max_labels is lesser than fixed unicast range.

Conflicts:
	src/vnsw/agent/cmn/agent.cc

Closes-Bug: 1535735
Change-Id: Id4a7b74f12728e78dcb5b8b24d0848e560ff0138
(cherry picked from commit eb0488b)
  • Loading branch information
Prabhjot Singh Sethi committed Jan 22, 2016
1 parent fd70b33 commit 6a4ba2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vnsw/agent/controller/controller_init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void VNController::SetAgentMcastLabelRange(uint8_t idx) {
// split remaining unicast label for both control
// node
// Remaining label would be used for unicast mpls label
if (agent_->vrouter_max_labels() == 0) {
if (agent_->vrouter_max_labels() <= MIN_UNICAST_LABEL_RANGE) {
str << 0 << "-" << 0;
fabric_multicast_label_range_[idx].start = 0;
fabric_multicast_label_range_[idx].end = 0;
Expand Down

0 comments on commit 6a4ba2a

Please sign in to comment.