]> git.proxmox.com Git - mirror_iproute2.git/commit
ipaddress: strengthen check on 'label' input
authorPatrick Talbert <ptalbert@redhat.com>
Thu, 14 Jun 2018 13:46:57 +0000 (15:46 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 15 Jun 2018 18:14:19 +0000 (11:14 -0700)
commitcad73425d8813508432005e032e7f36a1db30ecd
tree9dff1265f0f37ffbfc277c69b24d125dca7e70cc
parent5887ff0922a06d978d3271df9f01fcb04fadc75f
ipaddress: strengthen check on 'label' input

As mentioned in the ip-address man page, an address label must
be equal to the device name or prefixed by the device name
followed by a colon. Currently the only check on this input is
to see if the device name appears at the beginning of the label
string.

This commit adds an additional check to ensure label == dev or
continues with a colon.

Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ipaddress.c