diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-07-07 16:33:17 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-07 16:33:17 +0300 |
| commit | b02982d2a17e3a8a344f03eef9046c9e85a8f15e (patch) | |
| tree | dcbd2763c38272c86482171fde6870e63ac33b2e /smoketest/scripts | |
| parent | 6f2b5a12e29deb46c9a724f8405d9b4f67e6420f (diff) | |
| parent | 021f9c1b2be91e246e560a67396e54133e9eb626 (diff) | |
| download | vyos-1x-b02982d2a17e3a8a344f03eef9046c9e85a8f15e.tar.gz vyos-1x-b02982d2a17e3a8a344f03eef9046c9e85a8f15e.zip | |
Merge pull request #5313 from c-po/pppoe-default-route
frrender: T9054: keep PPPoE/DHCP default route when "protocols static" is deleted
Diffstat (limited to 'smoketest/scripts')
| -rwxr-xr-x | smoketest/scripts/cli/test_interfaces_pppoe.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_pppoe.py b/smoketest/scripts/cli/test_interfaces_pppoe.py index b8b0429a8..2c240d20e 100755 --- a/smoketest/scripts/cli/test_interfaces_pppoe.py +++ b/smoketest/scripts/cli/test_interfaces_pppoe.py @@ -416,5 +416,43 @@ class PPPoEInterfaceTest(VyOSUnitTestSHIM.TestCase): # Validate and verify assigned IP addresses self._verify_interface_address(interface) + def test_pppoe_default_route_survives_static_deletion(self): + # T6991/T9054: The PPPoE default route must not be withdrawn from FRR + # when "protocols static" is deleted - only the statically configured + # routes must disappear, the PPPoE-sourced default route must stay. + interface = self._interfaces[0] + (user, passwd) = self.u_p_dict[interface] + static_base_path = ['protocols', 'static'] + + self.cli_set(base_path + [interface, 'authentication', 'username', user]) + self.cli_set(base_path + [interface, 'authentication', 'password', passwd]) + self.cli_set(base_path + [interface, 'source-interface', self._source_interface]) + self.cli_commit() + + self.assertTrue(wait_for_interface(interface), + msg=f'Interface {interface} not found after {connect_timeout} seconds!') + + default_route = rf'ip route 0.0.0.0/0 {interface} tag 210' + frrconfig = self.getFRRconfig('') + self.assertIn(default_route, frrconfig) + + # Add an unrelated static route - this is what triggers "protocols + # static" to exist on the CLI in the first place + self.cli_set(static_base_path + ['route', '10.0.0.0/8', 'blackhole']) + self.cli_commit() + + frrconfig = self.getFRRconfig('') + self.assertIn(default_route, frrconfig) + self.assertIn(r'ip route 10.0.0.0/8 blackhole', frrconfig) + + # Now delete "protocols static" entirely - the PPPoE default route + # must remain in the FRR configuration (and thus in the RIB/FIB) + self.cli_delete(static_base_path) + self.cli_commit() + + frrconfig = self.getFRRconfig('') + self.assertNotIn(r'ip route 10.0.0.0/8 blackhole', frrconfig) + self.assertIn(default_route, frrconfig) + if __name__ == '__main__': unittest.main(verbosity=2, failfast=VyOSUnitTestSHIM.TestCase.debug_on()) |
