Page MenuHomeVyOS Platform

Ping incorrect ip host checks
Closed, ResolvedPublicBUG

Description

If you make a mistake (incorrect ip) while trying to ping.
For 1.3/1.4 you get such error:

vyos@r4-1.3:~$ ping 100.64..1
Traceback (most recent call last):
  File "/usr/lib/python3.7/encodings/idna.py", line 165, in encode
    raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/ping.py", line 222, in <module>
    ip = socket.gethostbyname(host)
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
vyos@r4-1.3:~$

How it looks like in the crux:

vyos@r12-lts:~$ ping 100.64..1
ping: Unknown host: 100.64..1
vyos@r12-lts:~$

Details

Version
1.3.0-rc5/1.4-rolling-202107242017
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)