Skip to content

dhcpv6-server: T3493: adds prefix range validation and fixes typos in…#3499

Merged
c-po merged 1 commit intovyos:sagittafrom
Giggum:sagitta
May 22, 2024
Merged

dhcpv6-server: T3493: adds prefix range validation and fixes typos in…#3499
c-po merged 1 commit intovyos:sagittafrom
Giggum:sagitta

Conversation

@Giggum
Copy link
Copy Markdown
Contributor

@Giggum Giggum commented May 22, 2024

… select ConfigError messages

Change Summary

  1. Adds detection for when prefix-delegation start and prefix-delegation stop addresses are not within the IPv6 subnet defined. A ConfigError message is raised for both cases.

  2. Updates typos in select ConfigError messages (e.g. then -> than, multipe -> multiple)

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)

https://vyos.dev/T3493

Related PR(s)

Component(s) name

dhcpv6-server service

Proposed changes

How to test

Test 1 - that prefix start address is not within subnet

set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 address-range start 2001:db8:3456::100 stop '2001:db8:3456::1ff'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 name-server '2001:db8:daad::1'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 prefix-delegation start 2001:db8:290::500 prefix-length '64'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 prefix-delegation start 2001:db8:290::500 stop '2001:db8:290::5ff

Output:
Prefix delegation start address "2001:db8:290::500" is not in subnet
"2001:db8:3456::/64"

Test 2 - that prefix stop address is not within subnet

set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 address-range start 2001:db8:3456::100 stop '2001:db8:3456::1ff'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 name-server '2001:db8:daad::1'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 prefix-delegation start 2001:db8:3456::500 prefix-length '64'
set service dhcpv6-server shared-network-name VyOS-DHCPv6 subnet 2001:db8:3456::/64 prefix-delegation start 2001:db8:3456::500 stop '2001:db8:290::5ff'

Output:
Prefix delegation stop address "2001:db8:290::5ff" is not in subnet
"2001:db8:3456::/64"

Smoketest result

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

@github-actions github-actions Bot added the sagitta VyOS 1.4 LTS label May 22, 2024
@c-po c-po requested review from a team, c-po, dmbaturin, jestabro, sarthurdev, sever-sever and zdc and removed request for a team May 22, 2024 06:15
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