Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T6906: IPoE-server add start-session option #4206

Open
wants to merge 1 commit into
base: current
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion data/templates/accel-ppp/ipoe.config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ verbose=1
{% set range = 'range=' ~ iface_config.client_subnet ~ ',' if iface_config.client_subnet is vyos_defined else '' %}
{% set relay = ',' ~ 'relay=' ~ iface_config.external_dhcp.dhcp_relay if iface_config.external_dhcp.dhcp_relay is vyos_defined else '' %}
{% set giaddr = ',' ~ 'giaddr=' ~ iface_config.external_dhcp.giaddr if iface_config.external_dhcp.giaddr is vyos_defined else '' %}
{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start=dhcpv4,ipv6=1{{ relay }}{{ giaddr }}
{% set start_map = {'dhcpv4': 'dhcpv4', 'unclassified-packet': 'up', 'auto': 'auto'} %}
{% set start = start_map[iface_config.start_session] %}
{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start={{ start }},ipv6=1{{ relay }}{{ giaddr }}
{% if iface_config.vlan_mon is vyos_defined %}
vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }}
{% endif %}
Expand Down
24 changes: 24 additions & 0 deletions interface-definitions/service_ipoe-server.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,30 @@
</properties>
<defaultValue>shared</defaultValue>
</leafNode>
<leafNode name="start-session">
<properties>
<help>Start session options</help>
<completionHelp>
<list>dhcpv4 unclassified-packet</list>
</completionHelp>
<valueHelp>
<format>auto</format>
<description>Start session with username as the interface name</description>
</valueHelp>
<valueHelp>
<format>dhcpv4</format>
<description>Start session on DHCPv4 Discover</description>
</valueHelp>
<valueHelp>
<format>unclassified-packet</format>
<description>Start session on unclassified-packet</description>
</valueHelp>
<constraint>
<regex>(auto|dhcpv4|unclassified-packet)</regex>
</constraint>
</properties>
<defaultValue>dhcpv4</defaultValue>
</leafNode>
<leafNode name="client-subnet">
<properties>
<help>Client address pool</help>
Expand Down
Loading