Skip to content

Commit 6dc7211

Browse files
pcn-router: fix bug when creating a service with full configuration
Routes should only be created after the ports, otherwise the route creation will fail because it'll not find an appropiate out interface. Signed-off-by: Mauricio Vasquez B <mauriciovasquezbernal@gmail.com>
1 parent 6716599 commit 6dc7211

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ Router::Router(const std::string name, const RouterJsonObject &conf)
3535
logger()->set_pattern("[%Y-%m-%d %H:%M:%S.%e] [Router] [%n] [%l] %v");
3636
logger()->info("Creating Router instance");
3737

38+
addPortsList(conf.getPorts());
3839
addArpEntryList(conf.getArpEntry());
3940
addRouteList(conf.getRoute());
4041

41-
addPortsList(conf.getPorts());
42-
4342
if (get_shadow()) {
4443
// netlink notification
4544
netlink_notification_index_route_added = netlink_instance_router_.registerObserver(

0 commit comments

Comments
 (0)