LinkByName with an altname that exceeds the 15 char limit fails
Closed this issue · 2 comments
steiler commented
The test for altnames only contains short (<15 char) altnames.
altnames are allowed to carry more characters. See:
# Query via Name
mava@server01:~/projects$ ip l show dev foobar
22: foobar: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 72:42:33:ae:b7:bf brd ff:ff:ff:ff:ff:ff
altname some_longer_altname
# Query via long AltName
mava@server01:~/projects$ ip l show dev vx-some_very_long_node_name_l1_e1-1
22: foobar: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 72:42:33:ae:b7:bf brd ff:ff:ff:ff:ff:ff
altname some_longer_altname
However, using this library I am getting the following error:
mava@server01:~/projects/netlink$ sudo go test -timeout 30s -run ^TestLinkAltName$ github.com/vishvananda/netlink
--- FAIL: TestLinkAltName (0.00s)
link_test.go:1937: numerical result out of range: Attribute failed policy validation
FAIL
FAIL github.com/vishvananda/netlink 0.005s
FAIL
Find the adjusted test here:
steiler@32fec64
@SchSeba Maybe you can take a look at this. After implementing #862
steiler commented
hellt commented
Thanks for the PR @steiler and your review @aboch
@aboch @vishvananda is there a planned date to have the next tagged release?