Skip to content

Commit

Permalink
Merge pull request #3730 from natali-rs1985/T5710-current
Browse files Browse the repository at this point in the history
pppoe-server: T5710: Add option permit any-login
  • Loading branch information
c-po authored Jun 28, 2024
2 parents 57c24a8 + c86909d commit 12fcf6c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data/templates/accel-ppp/pppoe.config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions interface-definitions/service_pppoe-server.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
11 changes: 11 additions & 0 deletions smoketest/scripts/cli/test_service_pppoe-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,17 @@ def test_pppoe_server_pado_delay(self):
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)

0 comments on commit 12fcf6c

Please sign in to comment.