Skip to content

Commit

Permalink
dhcp: T3316: Add captive portal v4/v6 options
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthurdev committed Jul 26, 2023
1 parent 0941ae2 commit a910649
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions interface-definitions/dhcp-server.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
</constraint>
</properties>
</leafNode>
#include <include/dhcp/captive-portal.xml.i>
<leafNode name="client-prefix-length">
<properties>
<help>Specifies the clients subnet mask as per RFC 950. If unset, subnet declaration is used.</help>
Expand Down
1 change: 1 addition & 0 deletions interface-definitions/dhcpv6-server.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
</tagNode>
</children>
</node>
#include <include/dhcp/captive-portal.xml.i>
#include <include/dhcp/domain-search.xml.i>
<node name="lease-time">
<properties>
Expand Down
11 changes: 11 additions & 0 deletions interface-definitions/include/dhcp/captive-portal.xml.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- include start from dhcp/captive-portal.xml.i -->
<leafNode name="captive-portal">
<properties>
<help>Captive portal API endpoint</help>
<valueHelp>
<format>txt</format>
<description>Captive portal API endpoint</description>
</valueHelp>
</properties>
</leafNode>
<!-- include end -->
6 changes: 4 additions & 2 deletions python/vyos/kea.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
'bootfile_size': 'boot-size',
'time_offset': 'time-offset',
'wpad_url': 'wpad-url',
'ipv6_only_preferred': 'v6-only-preferred'
'ipv6_only_preferred': 'v6-only-preferred',
'captive_portal': 'v4-captive-portal'
}

kea6_options = {
Expand All @@ -51,7 +52,8 @@
'nis_server': 'nis-servers',
'nisplus_domain': 'nisp-domain-name',
'nisplus_server': 'nisp-servers',
'sntp_server': 'sntp-servers'
'sntp_server': 'sntp-servers',
'captive_portal': 'v6-captive-portal'
}

def kea_parse_options(config):
Expand Down

0 comments on commit a910649

Please sign in to comment.