Skip to content

Conversation

@sever-sever
Copy link
Member

Change summary

  • Accept IPv6 network as an interface address
  • Add ipv6-cidr validator

Allow to configure IPv6 addresses like 2001:db8::/64 for interfaces

Before we had this Error:

  Error: 2001:db8::/64 is not a valid IP host

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)

How to test / Smoketest result

Before fix:

vyos@r14# set interfaces dummy dum4444 address 2001:db8::/64

  Error: 2001:db8::/64 is not a valid IP host
  
  
  
  Invalid value
  Value validation failed
  Set failed

[edit]
vyos@r14# 

After fix:

vyos@r14# run show conf com | match 2001
set interfaces dummy dum4444 address '2001:db8::/64'
set interfaces ethernet eth0 address '2001:db8::/64'
[edit]
vyos@r14# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address         MAC                VRF        MTU  S/L    Description
-----------  -----------------  -----------------  -------  -----  -----  -------------
dum0         192.0.2.1/32       9e:a7:c9:85:fb:1d  default   1500  u/u
dum4444      2001:db8::/64      f6:35:f0:60:0d:b3  default   1500  u/u
eth0         192.168.122.14/24  52:54:00:8d:67:6e  default   1500  u/u
             2001:db8::/64

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

 - Accept IPv6 network as interface address
 - Add `ipv6-cidr` validator

Allow to conigure IPv6 addresses like 2001:db8::/64 for interfaces

Before we had this Error:
```
  Error: 2001:db8::/64 is not a valid IP host
```
@github-actions
Copy link

👍
No issues in PR Title / Commit Title

@sever-sever sever-sever added the bp/circinus Create automatic backport for circinus label Nov 28, 2025
@github-actions
Copy link

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests VPP 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • Config tests VPP 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a correct solution to allow all valid (and only valid) IPv6 interface addresses to be assigned. --is-ipv6-cidr will consider ::/0 and multicast addresses valid, but they are not valid interface addresses.

So we need to add --is-ipv6-host and --is-any-host to allow all valid addresses, a quick workaround that will allow invalid addresses as a side effect is not a good idea I think.

@sever-sever
Copy link
Member Author

This isn't a correct solution to allow all valid (and only valid) IPv6 interface addresses to be assigned. --is-ipv6-cidr will consider ::/0 and multicast addresses valid, but they are not valid interface addresses.

So we need to add --is-ipv6-host and --is-any-host to allow all valid addresses, a quick workaround that will allow invalid addresses as a side effect is not a good idea I think.

@dmbaturin both do not work

root@r14:/home/vyos# ipaddrcheck --is-ipv6-host 2001:db8::/64
root@r14:/home/vyos# echo $?
1
root@r14:/home/vyos# 
root@r14:/home/vyos# 
root@r14:/home/vyos# ipaddrcheck --is-any-host 2001:db8::/64
root@r14:/home/vyos# echo $?
1
root@r14:/home/vyos# 

@dmbaturin
Copy link
Member

Now we are using the dedicated interface-address validator so we can just fix the function behind --is-valid-intf-address in ipaddrcheck, there's no need to adjust shell scripts anymore. I'll make a PR for ipaddrcheck soon.

@sever-sever Thanks for the effort!

@dmbaturin dmbaturin closed this Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bp/circinus Create automatic backport for circinus conflicts current

Development

Successfully merging this pull request may close these issues.

2 participants