diff options
-rw-r--r-- | data/templates/accel-ppp/pppoe.config.j2 | 5 | ||||
-rw-r--r-- | interface-definitions/service_pppoe-server.xml.in | 6 | ||||
-rwxr-xr-x | smoketest/scripts/cli/test_service_pppoe-server.py | 11 |
3 files changed, 21 insertions, 1 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.j2 b/data/templates/accel-ppp/pppoe.config.j2 index 6711f2ec9..73ffe0963 100644 --- a/data/templates/accel-ppp/pppoe.config.j2 +++ b/data/templates/accel-ppp/pppoe.config.j2 @@ -31,10 +31,13 @@ copy=1 level={{ log.level }} {% endif %} -{% if authentication.mode is vyos_defined("noauth") %} [auth] +{% if authentication.mode is vyos_defined("noauth") %} noauth=1 {% endif %} +{% if authentication.any_login is vyos_defined %} +any-login=1 +{% endif %} [client-ip-range] 0.0.0.0/0 diff --git a/interface-definitions/service_pppoe-server.xml.in b/interface-definitions/service_pppoe-server.xml.in index 81228938f..7cb1ec06e 100644 --- a/interface-definitions/service_pppoe-server.xml.in +++ b/interface-definitions/service_pppoe-server.xml.in @@ -47,6 +47,12 @@ </leafNode> </children> </node> + <leafNode name="any-login"> + <properties> + <help>Authentication with any login</help> + <valueless/> + </properties> + </leafNode> </children> </node> <tagNode name="interface"> diff --git a/smoketest/scripts/cli/test_service_pppoe-server.py b/smoketest/scripts/cli/test_service_pppoe-server.py index 97c63d4cb..34e45a81a 100755 --- a/smoketest/scripts/cli/test_service_pppoe-server.py +++ b/smoketest/scripts/cli/test_service_pppoe-server.py @@ -177,6 +177,17 @@ class TestServicePPPoEServer(BasicAccelPPPTest.TestCase): conf.read(self._config_file) self.assertEqual(conf['pppoe']['pado-delay'], '10,20:200,30:300,-1:400') + def test_pppoe_server_any_login(self): + # Test configuration of local authentication for PPPoE server + self.basic_config() + + self.set(['authentication', 'any-login']) + self.cli_commit() + + # Validate configuration values + config = read_file(self._config_file) + self.assertIn('any-login=1', config) + if __name__ == '__main__': unittest.main(verbosity=2) |