Skip to content

Add support for classful address and /LEN notation in CLI - #1663

Merged
troglobit merged 3 commits into
mainfrom
classful-address
Sep 26, 2026
Merged

troglobit merged 3 commits into
mainfrom
classful-address

Conversation

@troglobit

Copy link
Copy Markdown
Contributor

Description

This PR adds support for:

set interface eth0 ipv4 address 192.168.1.1/24

and

set interface eth0 ipv4 address 192.168.1.1

The latter implies /24 from the classic RFC 719.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

An IPv4 address set without a prefix length is accepted in the
candidate but fails on commit:

    Error: Mandatory choice "subnet" data do not exist.

Fill in the prefix length from the address class: /8 for class A, /16
for class B, /24 for class C.  Class D and E get no default.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Bump klish-plugin-sysrepo, which splits ADDR/LEN list keys into the
address and its prefix-length:

    set interface eth0 ipv4 address 192.168.1.1/24

This also works for IPv6, and with edit and delete.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit
troglobit merged commit c5bf5be into main Sep 26, 2026
15 of 16 checks passed
@troglobit
troglobit deleted the classful-address branch September 26, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants