sgw: egress interface routes must always be present when interface is up
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 1 Jun 2016 09:08:04 +0000 (11:08 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 1 Jun 2016 10:38:02 +0000 (12:38 +0200)
Because there might be pinned connections on them

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c

index ffafa69..ada923e 100644 (file)
@@ -2081,7 +2081,7 @@ static void configureEgressLinkRoutes(enum sgw_multi_change_phase phase) {
 
       struct sgw_route_info networkRoutePrevious = egress_if->networkRouteCurrent;
 
-      if (!egress_if->bwCurrent.networkSet || !egress_if->upCurrent || (egress_if->bwCurrent.costs == INT64_MAX)) {
+      if (!egress_if->bwCurrent.networkSet || !egress_if->upCurrent) {
         memset(&egress_if->networkRouteCurrent, 0, sizeof(egress_if->networkRouteCurrent));
         egress_if->networkRouteCurrent.active = false;
       } else {
@@ -2114,7 +2114,7 @@ static void configureEgressLinkRoutes(enum sgw_multi_change_phase phase) {
 
       struct sgw_route_info egressRoutePrevious = egress_if->egressRouteCurrent;
 
-      if (!egress_if->upCurrent || (egress_if->bwCurrent.costs == INT64_MAX)) {
+      if (!egress_if->upCurrent) {
         memset(&egress_if->egressRouteCurrent, 0, sizeof(egress_if->egressRouteCurrent));
         egress_if->egressRouteCurrent.active = false;
       } else {