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

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

Closed
wants to merge 0 commits into from

Conversation

Giggum
Copy link
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
@Giggum Giggum closed this May 22, 2024
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.

1 participant