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

T3493: dhcpv6-server does not have prefix range validation #3519

Merged
merged 3 commits into from
May 26, 2024

Conversation

c-po
Copy link
Member

@c-po c-po commented May 26, 2024

Change Summary

ISC DHCP server expects a string: prefix6 2001:db8:290:: 2001:db8:29f:: /64; where the IPv6 prefix/range must be :: terminaated with a delegated prefix length at the end.

This commit changes the validator that the IPv6 address defined on the CLI must always end with ::. In addition a verify() step is added to check that the stop address is greater than start address.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

dhcpv6-server

Proposed changes

How to test

Smoketest result

cpo@LR2.wue3:~$ /usr/libexec/vyos/tests/smoke/cli/test_service_dhcpv6-server.py
test_global_nameserver (__main__.TestServiceDHCPv6Server.test_global_nameserver) ... ok
test_prefix_delegation (__main__.TestServiceDHCPv6Server.test_prefix_delegation) ... ok
test_single_pool (__main__.TestServiceDHCPv6Server.test_single_pool) ... ok

----------------------------------------------------------------------
Ran 3 tests in 15.454s

OK

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

c-po added 2 commits May 26, 2024 08:32
$ touch /tmp/vyos.smoketest.debug

will enable dynamic debugging of the smoketests - showing the appropriate CLI
commands on stdout

(cherry picked from commit 0cb4294)
This reverts the prefix start/stop address must be inside network part from
commit 4cde0b8.
@c-po c-po marked this pull request as ready for review May 26, 2024 08:20
@c-po c-po requested a review from a team as a code owner May 26, 2024 08:20
@github-actions github-actions bot added the sagitta VyOS 1.4 LTS label May 26, 2024
@c-po c-po marked this pull request as draft May 26, 2024 08:21
…rt/stop address

ISC DHCP server expects a string: "prefix6 2001:db8:290:: 2001:db8:29f:: /64;"
where the IPv6 prefix/range must be :: terminaated with a delegated prefix
length at the end.

This commit changes the validator that the IPv6 address defined on the CLI must
always end with ::. In addition a verify() step is added to check that the
stop address is greater than start address.
@c-po c-po marked this pull request as ready for review May 26, 2024 08:28
@c-po c-po enabled auto-merge May 26, 2024 08:28
@c-po c-po merged commit 4a9befb into vyos:sagitta May 26, 2024
6 of 7 checks passed
@c-po c-po deleted the dhcpv6-T3493 branch May 26, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sagitta VyOS 1.4 LTS
Development

Successfully merging this pull request may close these issues.

3 participants