Skip to content

Commit 079dbf1

Browse files
committed
router: retrieve port index in a clever way in PortsSecondaryip
Retrieving the index as done before caused problems when secondary ip was added during port initialization
1 parent f118df2 commit 079dbf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/pcn-router/src/PortsSecondaryip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PortsSecondaryip::PortsSecondaryip(Ports &parent, const PortsSecondaryipJsonObje
3636
/*
3737
* Add two routes in the routing table
3838
*/
39-
int index = parent.parent_.Cube::get_port(parent.getName())->index();
39+
int index = parent.index();
4040
parent.parent_.add_local_route(ip_, parent.getName(), index);
4141
}
4242

0 commit comments

Comments
 (0)