bgp: fix the way of getting RouteFamily object