• Marco Varlese's avatar
    fix get_addr() and get_prefix() error messages · 334af761
    Marco Varlese authored
    An attempt to add invalid address to interface would print "???" string
    instead of the address family name.
    
    For example:
    $ ip address add 256.10.166.1/24 dev ens8
    Error: ??? prefix is expected rather than "256.10.166.1/24".
    
    $ ip neighbor add proxy 2001:db8::g dev ens8
    Error: ??? address is expected rather than "2001:db8::g".
    
    With this patch the output will look like:
    $ ip address add 256.10.166.1/24 dev ens8
    Error: inet prefix is expected rather than "256.10.166.1/24".
    
    $ ip neighbor add proxy 2001:db8::g dev ens8
    Error: inet6 address is expected rather than "2001:db8::g".
    Signed-off-by: default avatarPrzemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
    Signed-off-by: default avatarMarco Varlese <marco.varlese@intel.com>
    334af761
utils.c 19.9 KB