]> git.ipfire.org Git - thirdparty/iproute2.git/commit
utils: Always specify family for address in get_addr_1()
authorSerhey Popovych <serhe.popovych@gmail.com>
Thu, 18 Jan 2018 18:13:42 +0000 (20:13 +0200)
committerDavid Ahern <dsahern@gmail.com>
Sun, 21 Jan 2018 17:38:17 +0000 (09:38 -0800)
commitf2522007d8fee924cb098b4afc8af16f2b25829f
tree5987c8fd7b7cb064cd7096db6bcfd4f57ac0dfbc
parent8c75f69411bc8c3affe5d173afcf981d15f5da15
utils: Always specify family for address in get_addr_1()

Set ->family correctly when string representing address
is "default", "all" or "any": get_addr_1() might be called
with AF_UNSPEC (e.g. get_addr() -> get_addr_1()).

Extend support for zero address to all address families,
not only AF_INET and AF_INET6 when one explicitly given
as @family: use af_byte_len() to correctly set address length.

Still assume AF_INET when @family is AF_UNSPEC.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
lib/utils.c