  Recently, the mean free path of ionizing photons in the $z = 6$ intergalactic
medium (IGM) was measured to be very short, presenting a challenge to existing
reionization models. At face value, the measurement can be interpreted as
evidence that the IGM clumps on scales $M\lesssim 10^8$ M$_\odot$, a key but
largely untested prediction of the cold dark matter (CDM) paradigm. Motivated
by this possibility, we study the role that the underlying dark matter
cosmology plays in setting the $z > 5$ mean free path. We use two classes of
models to contrast against the standard CDM prediction: (1) thermal relic warm
dark matter (WDM), representing models with suppressed small-scale power; (2)
an ultralight axion exhibiting a white noise-like power enhancement.
Differences in the mean free path between the WDM and CDM models are subdued by
pressure smoothing and the possible contribution of neutral islands to the IGM
opacity. For example, comparing late reionization scenarios with a fixed
volume-weighted mean neutral fraction of $20\%$ at $z=6$, the mean free path is
$19~(45)~\%$ longer in a WDM model with $m_x = 3~(1)$ keV. The enhanced power
in the axion-like model produces better agreement with the short mean free path
measured at $z = 6$. However, drawing robust conclusions about cosmology is
hampered by large uncertainties in the reionization process, extragalactic
ionizing background, and thermal history of the Universe. This work highlights
some key open questions about the IGM opacity during reionization.
