Page MenuHomeVyOS Platform

Strings with spaces in "set interfaces * address" cause an ipaddrcheck argument error
Open, HighPublic

Description

vyos@vyos# set interfaces ethernet eth1 address "a valid IP address, I swear!"

  Error: wrong number of arguments, one argument required!
  Usage: ipaddrcheck <OPTIONS> [STRING]
  Address checking options:
    --is-valid                 Check if STRING is a valid IPv4 or IPv6 address
                                 with or without prefix length
    --is-any-cidr              Check if STRING is a valid IPv4 or IPv6 address
                                 with prefix length

The cause is that some of our code doesn't quote arguments before passing them to shell commands.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

dmbaturin triaged this task as High priority.