kalua: net: fixing a potential endless loop