commit
f3a2ddc124e0 ("lib utils: Use helpers to get AF bit/byte len")
used a wrong family or family of zero in the default case
during af_bit_len calculation causing ip route commands to
fail with below error
Error: an inet prefix is expected rather than "10.0.2.14/24".
Reported-by: Sven-Haegar Koch <haegar@sdinet.de>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
err = get_addr_1(dst, arg, family);
if (err == 0) {
- dst->bitlen = af_bit_len(family);
+ dst->bitlen = af_bit_len(dst->family);
if (slash) {
if (get_netmask(&plen, slash+1, 0)