diff options
| author | Indrajit Raychaudhuri <irc@indrajit.com> | 2026-05-13 10:52:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-13 18:52:28 +0300 |
| commit | 2f2bae3232862d07368e4508fa8f335f6f8819d4 (patch) | |
| tree | e84417332d4c5f4edcb98939e72a3d29cc456f0e /smoketest/scripts/cli | |
| parent | 69b6be91d0eacfd23feb13f96325923f6e26ed25 (diff) | |
| download | vyos-1x-2f2bae3232862d07368e4508fa8f335f6f8819d4.tar.gz vyos-1x-2f2bae3232862d07368e4508fa8f335f6f8819d4.zip | |
dhcp: T8848: Fix timezone pcode data (#5189)
According to Kea documentation:
When a data field is a string and that string contains
the comma (`,`; U+002C) character, the comma must be escaped
with two backslashes (`\\,`; U+005C) because both the routine
splitting of CSV data into fields and JSON use the same
escape character. A single escape (`\,`) would make the JSON
invalid.
Accordingly, the pcode generated for time-zone should have
the `,` double escaped. For example, `"GMT0BST,M3.5.0/1,M10.5.0"`
should be rendered as `"GMT0BST\\,M3.5.0/1\\,M10.5.0"`.
See: https://kea.readthedocs.io/en/stable/arm/dhcp4-srv.html#standard-dhcpv4-options
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_service_dhcp-server.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_service_dhcp-server.py b/smoketest/scripts/cli/test_service_dhcp-server.py index 129222313..a4def234c 100755 --- a/smoketest/scripts/cli/test_service_dhcp-server.py +++ b/smoketest/scripts/cli/test_service_dhcp-server.py @@ -574,7 +574,7 @@ class TestServiceDHCPServer(VyOSUnitTestSHIM.TestCase): self.verify_config_object( obj, ['Dhcp4', 'shared-networks', 0, 'subnet4', 0, 'option-data'], - {'name': 'pcode', 'data': 'GMT0BST,M3.5.0/1,M10.5.0'}, + {'name': 'pcode', 'data': 'GMT0BST\\,M3.5.0/1\\,M10.5.0'}, ) self.verify_config_object( obj, |
