From 052ed10a17e7d2cec6a254172f1c8c208b061215 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Fri, 29 Jun 2018 16:00:54 +0200 Subject: [PATCH] nic_router.run: fix invalid uplink Do not generate invalid configurations for the uplink domain anymore. If some tests are disabled and therefore their routing rules at the uplink domain would be invalid, spare out these routing rules. Issue #2899 --- repos/libports/run/nic_router.run | 42 ++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/repos/libports/run/nic_router.run b/repos/libports/run/nic_router.run index cca8a6f78e..c5ad16080d 100644 --- a/repos/libports/run/nic_router.run +++ b/repos/libports/run/nic_router.run @@ -42,6 +42,8 @@ proc test_1_router_config { } { } } } +proc test_1_router_uplink_config { } { } + # # Test 2 utilities @@ -59,6 +61,11 @@ proc test_2_router_config { } { } } } +proc test_2_router_uplink_config { } { + if {[enable_test_2]} { return { + } } +} + # # Test 3 utilities @@ -79,6 +86,11 @@ proc test_3_router_config { } { } } } +proc test_3_router_uplink_config { } { + if {[enable_test_3]} { return { + } } +} + # # Test 4 utilities @@ -96,6 +108,10 @@ proc test_4_router_config { } { } } } +proc test_4_router_uplink_config { } { + if {[enable_test_4]} { return { + } } +} # # Test 5 utilities @@ -113,6 +129,11 @@ proc test_5_router_config { } { } } } +proc test_5_router_uplink_config { } { + if {[enable_test_5]} { return { + } } +} + # # Test 6 utilities @@ -135,6 +156,11 @@ proc test_6_router_config { } { } } } +proc test_6_router_uplink_config { } { + if {[enable_test_6]} { return { + } } +} + # # Test 7 utilities @@ -186,7 +212,6 @@ proc test_7_config { } { } } - proc test_7_router_config { } { if {[enable_test_7]} { return { @@ -209,6 +234,8 @@ proc test_7_router_config { } { } } } +proc test_7_router_uplink_config { } { } + # # Init config @@ -268,11 +295,14 @@ append config { gateway="10.0.2.1" verbose_packets="no"> - - - - - + } [test_1_router_uplink_config] { + } [test_2_router_uplink_config] { + } [test_3_router_uplink_config] { + } [test_4_router_uplink_config] { + } [test_5_router_uplink_config] { + } [test_6_router_uplink_config] { + } [test_7_router_uplink_config] { + } [test_1_router_config] {