sgw: egress interface routes must also be programmed on interface up/down
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 1 Jun 2016 08:57:24 +0000 (10:57 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 1 Jun 2016 10:38:02 +0000 (12:38 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c

index 19882ce..ffafa69 100644 (file)
@@ -2076,7 +2076,7 @@ static void configureEgressLinkRoutes(enum sgw_multi_change_phase phase) {
     }
 
     /* network route */
-    if (egress_if->bwNetworkChanged || force) {
+    if (egress_if->upChanged || egress_if->bwNetworkChanged || force) {
       bool routeChanged;
 
       struct sgw_route_info networkRoutePrevious = egress_if->networkRouteCurrent;
@@ -2109,7 +2109,7 @@ static void configureEgressLinkRoutes(enum sgw_multi_change_phase phase) {
     }
 
     /* default route */
-    if (egress_if->bwGatewayChanged || force) {
+    if (egress_if->upChanged || egress_if->bwGatewayChanged || force) {
       bool routeChanged;
 
       struct sgw_route_info egressRoutePrevious = egress_if->egressRouteCurrent;