We propose a mechanism to construct the eigenvalues and eigenfunctions of the massless Dirac-Weyl equation in the presences of magnetic flux Φ localized in a restricted region of the plane. Using this mechanism we analyze the degeneracy of the existed energy levels. We find that the zero and first energy level has the same N+1 degeneracy, where N is the integer part of Φ2π. In addition, and contrary to what is described in the literature regarding graphene, we show that higher energy levels are N+m degenerate, being m the level of energy. In other words, this implies an indefinite growth of degenerate states as the energy level grows.